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

Add support for headless token #251

Closed
GabKlein opened this issue Jan 21, 2018 · 2 comments
Closed

Add support for headless token #251

GabKlein opened this issue Jan 21, 2018 · 2 comments

Comments

@GabKlein
Copy link

As the header provide useful information such as the algorithm used to encode the token, it can also be used against the system. In my case I'm would like to use headless token and force the algorithm to decode a token.

@excpt
Copy link
Member

excpt commented Jan 23, 2018

In order to check if the correct algorithm is set use the verify logic that is built in this gem.

# force check for algorithm HS256 -> otherwise throw an exception
JWT.decode token, secret, true, {algorithm: 'HS256'} 

@excpt
Copy link
Member

excpt commented Mar 22, 2018

@GabKlein Is still relevant? Is using the decode and verification logic a viable solution?

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