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 OAuth2 with JSON Web Token #211

Open
LorenzoLeonardo opened this issue Apr 12, 2023 · 7 comments
Open

Support OAuth2 with JSON Web Token #211

LorenzoLeonardo opened this issue Apr 12, 2023 · 7 comments

Comments

@LorenzoLeonardo
Copy link
Contributor

Don't we support urn:ietf:params:oauth:grant-type:jwt-bearer in getting an access token?

@LorenzoLeonardo LorenzoLeonardo changed the title OAuth2 and JSON Web Token Support OAuth2 with JSON Web Token Apr 12, 2023
@marcel-hamer
Copy link

marcel-hamer commented Nov 26, 2023

I have done a first setup in this commit fork that I have tested against Keycloak successfully.

I am unsure if this needs more work for other use cases.

@seanpianka
Copy link

Is this fork safe to merge into the mainline? I'm interested in using this for Apple SSO

@fiadliel
Copy link

fiadliel commented Feb 9, 2024

Just to note, I think this implements §2.2 of RFC 7523, but not §2.1 (which requires a new grant type).

@seanpianka
Copy link

I will do what I can by forking and modifying it on my own to support that section... trying to avoid handrolling an oauth2 implementation if possible for Apple's SSO!

@seanpianka
Copy link

Apple's SSO seemed to only require a dynamic client_secret, as described in their docs here. I've essentially just added a step before requesting an access token in my own codebase that generates this JWT using jwt-simple, then overwrite the client secret with that value.

@ramosbugs
Copy link
Owner

JWTs add significant complexity that I would like to avoid in this crate. See earlier comment. Just as I implemented OpenID Connect in a separate crate on top of this one, I think RFC 7523 is complex enough to merit its own crate (maintained by someone else).

If there are API changes needed to this crate in order to be able to build that separate crate (e.g., stuff like add_extra_param), I'd be happy to discuss those.

@marcel-hamer
Copy link

For me it works fine setting the client_assertion and client_assertion_type through the add_extra_param() function. I have only used and tested §2.2 of RFC 7523 for now.

@ramosbugs ramosbugs mentioned this issue Apr 7, 2024
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

5 participants