Skip to content
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

Add sessions and refresh tokens to Users Management API #661

Merged
merged 7 commits into from
Sep 11, 2024

Conversation

tanya732
Copy link
Contributor

@tanya732 tanya732 commented Sep 3, 2024

Changes

Adds support for the following APIs:

https://auth0.com/docs/api/management/v2/users/get-refresh-tokens-for-user
https://auth0.com/docs/api/management/v2/users/delete-refresh-tokens-for-user
https://auth0.com/docs/api/management/v2/refresh-tokens/get-refresh-token
https://auth0.com/docs/api/management/v2/refresh-tokens/delete-refresh-token

https://auth0.com/docs/api/management/v2/users/get-sessions-for-user
https://auth0.com/docs/api/management/v2/users/delete-sessions-for-user
https://auth0.com/docs/api/management/v2/sessions/get-session
https://auth0.com/docs/api/management/v2/sessions/delete-session

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.

  • This change adds test coverage
  • This change has been tested on the latest version of the platform/language or why not

Checklist

@tanya732 tanya732 requested a review from a team as a code owner September 3, 2024 16:35
Copy link
Contributor

@jimmyjames jimmyjames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some comments; a few other things:

  • Any reason to not also add support for the /sessions endpoints here? e.g., https://auth0.com/docs/api/management/v2/sessions/get-session. Or is that going to follow in a standalone PR?
  • It appears this branch is out-of-date with main and a CI check is failing, will need to update the branch with latest main and address CI failure.

Related to the /sessions endpoint, I believe the schema is the same for both /sessions and /users/{userId}/sessions. So we may want to consider where the new classes are packaged so they can be reused, maybe it makes sense to have a sessions package? Or maybe keeping them in users is ok, what do you think?

EDIT: One more question - have the new methods introduced here been tested against a live server to verify everything is working as expected?

@tanya732
Copy link
Contributor Author

tanya732 commented Sep 5, 2024

  • /sessions

Earlier it was not added in JIRA, now I have added /sessions and /refresh-tokens API's in the same PR

Copy link
Contributor

@jimmyjames jimmyjames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just need some minor javadoc updates

@tanya732 tanya732 changed the title Session refresh tokens Add sessions and refresh tokens to Users Management API Sep 9, 2024
@tanya732 tanya732 merged commit 8934e14 into master Sep 11, 2024
8 checks passed
@tanya732 tanya732 deleted the session-refresh-tokens branch September 11, 2024 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants