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

Encode id param on GET #374

Merged
merged 1 commit into from
Jul 11, 2019
Merged

Encode id param on GET #374

merged 1 commit into from
Jul 11, 2019

Conversation

luisrudge
Copy link
Contributor

Fix #296

Changes

When hitting the management API in endpoints like https://example.auth0.com/api/v2/resource/:id, some of the IDs might need to be encoded, like user ids etc. This PR is a general solution for this issue and it will encode all id params sent to GET requests. To make sure we're backwards compatible and we don't encode something that is already encoded, we're doing a check before encoding the value. This means that:

  • if the id param is encoded, we'll do nothing
  • if the id param is not encoded, we'll encode it

References

#296

Testing

  • This change adds unit test coverage

@luisrudge luisrudge added CH: Changed small Small review labels Jul 8, 2019
@luisrudge luisrudge requested a review from a team July 8, 2019 17:50
@luisrudge luisrudge merged commit 5424a45 into master Jul 11, 2019
@luisrudge luisrudge deleted the fix/encode-ids branch July 11, 2019 17:15
@luisrudge luisrudge added this to the v2.18.1 milestone Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

encode user_id when using it in urls
2 participants