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

How to get user detail in proxy api #933

Closed
aroopghoshtarento opened this issue Jul 24, 2019 · 5 comments
Closed

How to get user detail in proxy api #933

aroopghoshtarento opened this issue Jul 24, 2019 · 5 comments

Comments

@aroopghoshtarento
Copy link

Hi,

I am using oauth2 policy and i need to get the logged in user detail in my proxy endpoint, but i am could not able to get that. I tried using forwardHeaders, but in that i get consumers but not the users.

@XVincentX
Copy link
Member

@aroopghoshtarento Can you show how you're creating the user and how you're sending such header?

@aroopghoshtarento
Copy link
Author

I created the user from eg users create
then i created the app and credentials for oauth and basic-auth

@aroopghoshtarento
Copy link
Author

policies:
# Uncomment key-auth: when instructed to in the Getting Started guide.
- oauth2:
- action:
passThrough: true
- headers:
- action:
headersPrefix: 'eg-'
forwardHeaders:
id: 'consumer.id'
consumer-name: 'consumer.name'
consumer-type: 'consumer.type'
requestID: 'requestID'
- proxy:
- action:
serviceEndpoint: httpbin
changeOrigin: true

@XVincentX
Copy link
Member

@aroopghoshtarento I'm assuming you're using the opaque token and not the JWT, is that correct?

@XVincentX
Copy link
Member

By the way this is a duplicate of #888 — let's keep the conversation there.

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

No branches or pull requests

2 participants