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 pkce support #38

Merged
merged 13 commits into from
Sep 3, 2021
Merged

Add pkce support #38

merged 13 commits into from
Sep 3, 2021

Conversation

maxxiefjv
Copy link
Contributor

Add PKCE support when requested by the client. Used reference is displayed in RFC 7636. Only for the authorization_code flow.

https://datatracker.ietf.org/doc/html/rfc7636

New requests optionally include the query parameters: code_challenge and code_challenge_method on the initial authorize request, then on token_endpoint it is required to contain a code_verifier parameter containing the code_verifier used to create the hash passed earlier as code_challenge.

@maxxiefjv maxxiefjv changed the title Add pkce pyop Add pkce support Jun 17, 2021
@annejan
Copy link

annejan commented Jun 23, 2021

This helps a lot, hope it gets merged quickly . .

@maxxiefjv
Copy link
Contributor Author

maxxiefjv commented Aug 9, 2021

Hi @c00kiemon5ter,

Thanks for the reply!

Sorry for my late response. To be honest, I missed that implementation completely. Although, it seems to me its an incomplete extension? Or I am missing some features here? (Also, I believe that your library does not use the Client class extensively, making the use of the functions in their classes not so straight forward as one might like?)

Reusing as much code as possible, I now changed the code_verifier to use the function included in the OIC provider extension (which also allows the removal of the dependency on the nacl library). Note though, that this function lacks plaintext support, even though the RFC7637 (https://datatracker.ietf.org/doc/html/rfc7636#section-4.2) standard shows that should be supported. Hence, I removed the test.

Looking forward to your thoughts on this

@c00kiemon5ter c00kiemon5ter merged commit 2f110dc into IdentityPython:master Sep 3, 2021
@c00kiemon5ter
Copy link
Member

thank you @maxxiefjv

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 this pull request may close these issues.

3 participants