File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -230,6 +230,7 @@ def get_authorization_request_url(
230
230
response_type = "code" , # Can be "token" if you use Implicit Grant
231
231
prompt = None ,
232
232
nonce = None ,
233
+ domain_hint = None , # type: Optional[str]
233
234
** kwargs ):
234
235
"""Constructs a URL for you to start a Authorization Code Grant.
235
236
@@ -251,6 +252,12 @@ def get_authorization_request_url(
251
252
:param nonce:
252
253
A cryptographically random value used to mitigate replay attacks. See also
253
254
`OIDC specs <https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest>`_.
255
+ :param domain_hint:
256
+ Can be one of "consumers" or "organizations" or your tenant domain "contoso.com".
257
+ If included, it will skip the email-based discovery process that user goes
258
+ through on the sign-in page, leading to a slightly more streamlined user experience.
259
+ https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow#request-an-authorization-code
260
+ https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-oapx/86fb452d-e34a-494e-ac61-e526e263b6d8
254
261
:return: The authorization url as a string.
255
262
"""
256
263
""" # TBD: this would only be meaningful in a new acquire_token_interactive()
@@ -281,6 +288,7 @@ def get_authorization_request_url(
281
288
prompt = prompt ,
282
289
scope = decorate_scope (scopes , self .client_id ),
283
290
nonce = nonce ,
291
+ domain_hint = domain_hint ,
284
292
)
285
293
286
294
def acquire_token_by_authorization_code (
You can’t perform that action at this time.
0 commit comments