Added ManagementAPI token provider customization#729
Added ManagementAPI token provider customization#729krrrr38 wants to merge 1 commit intoauth0:masterfrom
Conversation
|
I really appreciate the contribution. I’ll review it today and get back to you shortly. |
|
@tanya732 please review, thanks! |
|
Hi @krrrr38, @salbracco24 Thanks so much for this contribution! I appreciate you taking the time to improve the SDK. The idea of using a TokenProvider interface is to introduce flexibility for managing tokens. However, the current implementation has a small issue and API clarity. It forces users who want to use the new TokenProvider to still provide a redundant API token to the constructor, which can be confusing and error prone if not configured properly. To make this a seamless and clean integration for all of our users, I would propose a different approach for the ManagementAPI.Builder:
This approach offers Backward Compatibility, Flexibility and Clarity. What do you think of this approach? I'm happy to discuss further. Thank you |
a5726b4 to
01dd898
Compare
|
Hi @krrrr38 Thanks again for the contribution! I believe this change will also require a small update to the README/Example docs so others can understand how to use this. Thank you |
b3a3491 to
f152bdb
Compare
|
@tanya732 oops. updated, thanks. |
salbracco24
left a comment
There was a problem hiding this comment.
I'm fine with the approach described here:
#729 (comment)
|
Can you please help signing all your commits ? Thank you |
f152bdb to
dbbca75
Compare
|
@tanya732 updated. |
| */ | ||
| public Builder(String domain, TokenProvider tokenProvider) { | ||
| this.domain = domain; | ||
| this.apiToken = apiToken; |
There was a problem hiding this comment.
We have to update the build method with tokenProvider
dbbca75 to
8bf99b3
Compare
|
Epic! |
Changes
Please describe both what is changing and why this is important. Include:
ManagementAPIcurrently support only api token. Auth0 supports api auth with authenticate-with-private-key-jwt and so on. At that time, we need to change Token Provider.References
N/A
Testing
Please describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.
Checklist