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

Idea: Attempt to authenticate tokens without X-Token-Type #6

Closed
djones6 opened this issue Sep 20, 2019 · 0 comments · Fixed by #7
Closed

Idea: Attempt to authenticate tokens without X-Token-Type #6

djones6 opened this issue Sep 20, 2019 · 0 comments · Fixed by #7
Assignees
Milestone

Comments

@djones6
Copy link
Collaborator

djones6 commented Sep 20, 2019

The Credentials plugins require an X-Token-Type header to be set to one of JWT, GoogleToken, or FacebookToken in order to determine which plugin should attempt to handle a request.

However, a potential use-case is that Credentials is used solely with JWT authentication, and with a 3rd party client that supplies the standard Authorization: Bearer <token> header. In this scenario, the X-Token-Type: JWT header would need to be manually set in order to work with Credentials.

In addition, when constructing usage examples where the curl command-line is used, the extra header is a distraction:

curl -H 'Authorization: Bearer <token>' -H 'X-token-type: JWT' http://localhost:8080/protectedRoute

We could relax the requirements for authentication so that Credentials plugins attempt to authenticate a request if the X-Token-Type header is not set.

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

Successfully merging a pull request may close this issue.

1 participant