Skip to content

Initial OAuth2.0/PKCE Provider support #617

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

Merged
merged 15 commits into from
Dec 16, 2018
Merged

Conversation

JonathanHuot
Copy link
Member

@JonathanHuot JonathanHuot commented Nov 29, 2018

Initial implementation of PKCE support for OAuth2.0 provider in oauthlib.

In order to have PKCE for your OAuth2.0 provider, you have three new RequestValidator methods to implement:

  • is_pkce_required(client_id, request) => default return False
  • get_code_challenge(code, request) => default return None
  • get_code_challenge_method(code, request) => raise NotImplemented (called only if get_code_challenge is overriden)

The behavior choosen was to not break any existing implementation, i.e. any upgrade to latest oauthlib will not give you PKCE for free and not break existing clients requests (even if they send a verifier or a challenge).

Any comments from downstream libraries devs are greatly appreciated. Also it can help jazzband/django-oauth-toolkit#656 to be resolved. Poke @jleclanche, @Maronato.

Fix grant_types_supported which must include "implicit" even if it is not a grant_type in oauthlib sense. Removed internal "none" field value from the list of response_types.
@JonathanHuot JonathanHuot mentioned this pull request Dec 3, 2018
23 tasks
@JonathanHuot JonathanHuot added this to the 3.0.0 milestone Dec 13, 2018
@JonathanHuot JonathanHuot added Feature OAuth2-Provider This impact the provider part of OAuth2 labels Dec 13, 2018
@Maronato
Copy link

@JonathanHuot it was pretty easy to implement your changes into django-oauth-toolkit. The PR containing the implementation is at jazzband/django-oauth-toolkit#678

@JonathanHuot JonathanHuot merged commit 8de1e52 into master Dec 16, 2018
@JonathanHuot JonathanHuot deleted the 601-pkce-support branch December 16, 2018 17:57
@JonathanHuot
Copy link
Member Author

Thanks @Maronato for your feedback! It's integrated into master now, we'll be able to release 3.0.0 soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature OAuth2-Provider This impact the provider part of OAuth2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy