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

support the cookie as token source (token_from) for JWT authenticator #330

Closed
ngrigoriev opened this issue Jan 3, 2020 · 2 comments
Closed

Comments

@ngrigoriev
Copy link
Contributor

Is your feature request related to a problem? Please describe.

According to the Oathkeeper documentation the "jwt" authenticator can fetch the token from either a named HTTP header or from the query parameter. At the same time, "oauth2_introspection" authenticator supports the named cookie as source. It would be great to support the cookie source for "jwt" authenticator as well.

Describe the solution you'd like

I may be wrong but it looks like it may be already supported, authenticator_jwt.go calls helper.BearerTokenFromRequest() to get the token and this function does support all 3 sources. Is it possible that this is just a missed point in the documentation?

Thanks!

@aeneasr
Copy link
Member

aeneasr commented Jan 7, 2020

Yes, I believe this is just a docs issue!

@ngrigoriev
Copy link
Contributor Author

ngrigoriev commented Jan 7, 2020

I am trying to add the unit tests for this + update the schema. Turns out, both authenticator_oauth2_introspection_test.go and authenticator_jwt_test.go are missing the tests for the cookie case and the schema for the "jwt" authenticator is missing this oneof element too. Will provider a PR soon.

ngrigoriev added a commit to ngrigoriev/oathkeeper that referenced this issue Jan 7, 2020
… oauth2_introspection authenticators (ory#330)

Update the schemas to add missing cookie config element

Signed-off-by: Grigoriev, Nikolai <[email protected]>
@aeneasr aeneasr closed this as completed in 7516eed Jan 9, 2020
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