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

URL rewrite using dynamic data in JWT #4

Closed
platinummonkey opened this issue Jan 11, 2016 · 1 comment
Closed

URL rewrite using dynamic data in JWT #4

platinummonkey opened this issue Jan 11, 2016 · 1 comment

Comments

@platinummonkey
Copy link
Owner

clone from: auth0#8

Leverage the URL rewrite capabilities of Nginx (ex: using the ngx_http_rewrite_module module) and perform a rewrite where the destination URL contains data from the JWT.

Example:

  • The Nginx endpoint being called is /api/userinfo and the JWT passed by the client contains a field user_id: sandrino123
  • The rewritten URL to the downstream endpoint becomes https://server01/legacy/api/getuserinfofor/$user_id (where $user_id is a value from the JWT in the Authorization header)
@hulu1522
Copy link

hulu1522 commented Jun 3, 2016

I just opened PR #7 as a solution to this issue. It may not be what you are looking for but I thought I would give it a go. I feel that any rewriting should be done by the client and that rewrites are out of the scope of this module. The PR give users the ability to request the 'payload' table in order to perform any rewrites they need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants