Skip to content

Commit 736da1c

Browse files
authored
Merge pull request #106 from AzureAD/support-prompt-parameter
Support prompt parameter
2 parents e71c791 + 05a195b commit 736da1c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

msal/application.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ def get_authorization_request_url(
195195
state=None, # Recommended by OAuth2 for CSRF protection
196196
redirect_uri=None,
197197
response_type="code", # Can be "token" if you use Implicit Grant
198+
prompt=None,
198199
**kwargs):
199200
"""Constructs a URL for you to start a Authorization Code Grant.
200201
@@ -208,6 +209,11 @@ def get_authorization_request_url(
208209
:param str response_type:
209210
Default value is "code" for an OAuth2 Authorization Code grant.
210211
You can use other content such as "id_token".
212+
:param str prompt:
213+
By default, no prompt value will be sent, not even "none".
214+
You will have to specify a value explicitly.
215+
Its valid values are defined in Open ID Connect specs
216+
https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest
211217
:return: The authorization url as a string.
212218
"""
213219
""" # TBD: this would only be meaningful in a new acquire_token_interactive()
@@ -235,6 +241,7 @@ def get_authorization_request_url(
235241
return client.build_auth_request_uri(
236242
response_type=response_type,
237243
redirect_uri=redirect_uri, state=state, login_hint=login_hint,
244+
prompt=prompt,
238245
scope=decorate_scope(scopes, self.client_id),
239246
)
240247

0 commit comments

Comments
 (0)