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

Feature: JWT decoding #187

Open
ocramz opened this issue Jun 11, 2023 · 2 comments
Open

Feature: JWT decoding #187

ocramz opened this issue Jun 11, 2023 · 2 comments
Assignees
Labels

Comments

@ocramz
Copy link

ocramz commented Jun 11, 2023

Many OAuth2 access tokens seem to be JWT-encoded and I often decode them to obtain an user ID (e.g. from the 'sub' field of JWT). This is not strictly standard but the industry seems to be moving in this direction https://datatracker.ietf.org/doc/html/draft-ietf-oauth-access-token-jwt-10

Using something like jwt package perhaps we could add a helper function OAuth2 -> Validation [Text] JWT or similar

@ocramz
Copy link
Author

ocramz commented Jun 11, 2023

I've made a PR to jwt puffnfresh/haskell-jwt#7 that if accepted could come in handy here as well.

@freizl
Copy link
Owner

freizl commented Jun 12, 2023

Good point!
I'll be thinking to create another package like hoauth2-jwt which has helpers for access token and ID token validation if it's JWT.

@freizl freizl self-assigned this Jul 10, 2023
@freizl freizl added the feature label Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants