Skip to content

Commit 152b12c

Browse files
committed
Customizable response_type, useful in B2C
1 parent 5b5e8de commit 152b12c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

msal/application.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,9 @@ def get_authorization_request_url(
205205
Identifier of the user. Generally a User Principal Name (UPN).
206206
:param str redirect_uri:
207207
Address to return to upon receiving a response from the authority.
208+
:param str response_type:
209+
Default value is "code" for an OAuth2 Authorization Code grant.
210+
You can use other content such as "id_token".
208211
:return: The authorization url as a string.
209212
"""
210213
""" # TBD: this would only be meaningful in a new acquire_token_interactive()
@@ -230,7 +233,7 @@ def get_authorization_request_url(
230233
{"authorization_endpoint": the_authority.authorization_endpoint},
231234
self.client_id)
232235
return client.build_auth_request_uri(
233-
response_type="code", # Using Authorization Code grant
236+
response_type=response_type,
234237
redirect_uri=redirect_uri, state=state, login_hint=login_hint,
235238
scope=decorate_scope(scopes, self.client_id),
236239
)

0 commit comments

Comments
 (0)