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 additional response_types in WebApplicationClient #773

Open
juur opened this issue Aug 18, 2021 · 1 comment
Open

Support additional response_types in WebApplicationClient #773

juur opened this issue Aug 18, 2021 · 1 comment
Labels
Contributor Friendly Feature OAuth2-Client This impact the client part of OAuth2. OIDC OpenID Connect

Comments

@juur
Copy link

juur commented Aug 18, 2021

It would be helpful to allow oauthlib.oauth2.WebApplicationClient to support supplementary response_types in addition to code. For example, for Azure a response_type=id_token+code returns an additional id_token in the Access Token response, this contains useful information such as the email address of the user. See this Stackoverflow answer.

I was thinking the signature could be changed to prepare_request_uri(uri, redirect_uri=None, scope=None, state=None, response_type=None, **kwargs).

The if response_type is not None it could be added e.g.

_response_type = if response_type then 'code+' + response_type else 'code'
return prepare_grant_uri(uri, self.client_id, _response_type,
redirect_uri=redirect_uri, scope=scope, state=state, **kwargs)

@JonathanHuot
Copy link
Member

Hi @juur , yes actually the OIDC Client is not implemented yet, so it should be part of it ; see https://oauthlib.readthedocs.io/en/latest/feature_matrix.html

Any PR into that direction will be very welcome :)
Like creating a new class oauthlib.oidc.WebApplicationClient and make the base one parametrized, maybe ?

@JonathanHuot JonathanHuot added Contributor Friendly Feature OAuth2-Client This impact the client part of OAuth2. OIDC OpenID Connect labels Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Contributor Friendly Feature OAuth2-Client This impact the client part of OAuth2. OIDC OpenID Connect
Projects
None yet
Development

No branches or pull requests

2 participants