-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allows for multi user support #11
base: master
Are you sure you want to change the base?
Conversation
@@ -1,3 +1,3 @@ | |||
module EbayClient | |||
VERSION = '0.2.0.981' | |||
VERSION = '0.2.0.982' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the last number in the version reflects the ebay api version used - if so the version should be 0.2.1.981
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the version used for the gemspec, So I suggest you put the ebay version somewhere else so the ruby gem can be properly versioned with bundle update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you want me to change it to 0.2.1.981
for now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the slow feedback, but how would just setting the token allow for "multiple users"? Aren't appid
, devid
and certid
equally part of a user? I reckon that having several instances of the client each with it's own set of settings in an individual configuration would be more sensible: (see engine.rb
)
configurations = EbayClient::Configuration.load File.load('<config file>')
configuration = configurations[<environment>]
EbayClient.api = EbayClient::Api.new configuration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its been a while since I touched this gem, but my understanding of the Ebay API
AppId, devid, certid - should never change
user_id gets generated each time a user OAuth's through your app. So if you only want to have 1 user per app installation then yes this would be correct
However if your app needs to Auth multiple users through one service it can no longer be hard coded and needs to be generated on the fly
I currently use my forked gem on our production app, If you already provide this functionality ill be happy to move back to the original
This extra option allows for you to configure a user token outside the YML file meaning your app can support multiple users