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

Possible way to access request header key,value #1780

Closed
sandakith opened this issue Oct 28, 2020 · 1 comment
Closed

Possible way to access request header key,value #1780

sandakith opened this issue Oct 28, 2020 · 1 comment

Comments

@sandakith
Copy link

I read and tested CustomMatcher as for your documentation, is there a way to access both key and value of a custom request header. For example if we are to implement JWT autherizer at the gateway level trying to find a way if we can access the token content value also together with key ...

@johanbrandhorst
Copy link
Collaborator

https://github.com/grpc-ecosystem/grpc-gateway#supported has a section on the automatic translation of headers - there is a special case in place for the Authorization header, it is forwarded into gRPC metadata without any modifications, so you can use it as in this example with a gRPC interceptor: https://jbrandhorst.com/post/grpc-auth/.

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