-
Notifications
You must be signed in to change notification settings - Fork 133
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
implemented /api/v2/grants endpoint of auth0 management api #74
Conversation
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.
Thanks for the contribution. 🎉 This is a relatively new API and I need to check with the other team the usage. The GET looks ok but the DELETE I'm still trying to figure out how it works (which params are required, etc). I'll come back to this in a few days.
Regarding the diff my bet is that it's because of the line endings. Please check this and this articles to fix them and add the files again.
Cheers 👍
4ab45c4
to
119ea14
Compare
I fixed the line endings and did some further investigation of the delete endpoint, i.e., I tried it out by calling the management API. It is valid to omit either the user id or the grant id. If you omit both, you get
My code now reflects this behaviour. Cheers, |
It looks a lot cleaner now! 👍 I checked with the team and they told me only one parameter is required at the same time, either user_id (query) or grant_id (path). Because of this, I would have 2 separate methods:
|
👍 That's a good idea, and much more friendly for the API consumer! |
Cool! Whenever you can feel free to make the changes and ping me so I merge it. |
119ea14
to
35dd7f6
Compare
I've made the changes. |
Sorry, I've just discovered a copy/paste error (GrantsEntityTest is referencing MGMT_CLIENT_GRANTS_LIST). I will fix this. Please do not merge yet! |
35dd7f6
to
fbee29d
Compare
It is fixed now. Ready to merge (from my side). |
The Grants endpoint of the management API was missing. Since I need it in one of my projects, I decided to directly add it to the official library. Also added unit tests.
Somehow, the git diff here at github marks some changes as a complete remove and add. However, in .gitignore, I only added a NetBeans IDE ignore pattern at the end and in ManagementAPI.java, only lines 118-125 were added.