Per-call credentials#31
Open
eropple wants to merge 13 commits intowingrunr21:masterfrom
eropple:feature/per-call-credentials
Open
Per-call credentials#31eropple wants to merge 13 commits intowingrunr21:masterfrom eropple:feature/per-call-credentials
eropple wants to merge 13 commits intowingrunr21:masterfrom
eropple:feature/per-call-credentials
Conversation
- Added an 'auth:' named local for MindBody::Client#call that allows custom per-call credentials. If no parameter is passed, falls back to the standard behavior of using MindBody::configuration for client details. - Fixed broken tests (missing mocks) - Added tests for 'auth:' cases.
Owner
|
Overall this looks ok. I'll need a README update. Is this strategy of per-call overrides preferable over multiple instances? I'd actually considered removing the singleton-style of configuration and having the user create different instances instead (ala faraday). |
Author
|
I would totally love to do it via a configuration thing, but that was a way bigger change and I'm not super comfortable with the object model in here right now--figuring out where everything would need to be touched is a pretty big step. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm building something that requires access to multiple MindBody customers at a time. To that end I've extended
MindBody::Clientto support this by passing in anauth:parameter alongsidemessage:and written tests to cover the major cases for it (noauth:,auth:with source credentials,auth:with both source and user credentials).Also, some tests were broken in
masterand I've fixed those as part of this branch.