@@ -376,7 +376,6 @@ def initiate_auth_code_flow(
376
376
def get_authorization_request_url (
377
377
self ,
378
378
scopes , # type: list[str]
379
- # additional_scope=None, # type: Optional[list]
380
379
login_hint = None , # type: Optional[str]
381
380
state = None , # Recommended by OAuth2 for CSRF protection
382
381
redirect_uri = None ,
@@ -425,14 +424,6 @@ def get_authorization_request_url(
425
424
426
425
:return: The authorization url as a string.
427
426
"""
428
- """ # TBD: this would only be meaningful in a new acquire_token_interactive()
429
- :param additional_scope: Additional scope is a concept only in AAD.
430
- It refers to other resources you might want to prompt to consent
431
- for in the same interaction, but for which you won't get back a
432
- token for in this particular operation.
433
- (Under the hood, we simply merge scope and additional_scope before
434
- sending them on the wire.)
435
- """
436
427
authority = kwargs .pop ("authority" , None ) # Historically we support this
437
428
if authority :
438
429
warnings .warn (
@@ -1007,6 +998,7 @@ def acquire_token_interactive(
1007
998
claims_challenge = None ,
1008
999
timeout = None ,
1009
1000
port = None ,
1001
+ extra_scopes_to_consent = None ,
1010
1002
** kwargs ):
1011
1003
"""Acquire token interactively i.e. via a local browser.
1012
1004
@@ -1043,6 +1035,12 @@ def acquire_token_interactive(
1043
1035
By default we will use a system-allocated port.
1044
1036
(The rest of the redirect_uri is hard coded as ``http://localhost``.)
1045
1037
1038
+ :param list extra_scopes_to_consent:
1039
+ "Extra scopes to consent" is a concept only available in AAD.
1040
+ It refers to other resources you might want to prompt to consent for,
1041
+ in the same interaction, but for which you won't get back a
1042
+ token for in this particular operation.
1043
+
1046
1044
:return:
1047
1045
- A dict containing no "error" key,
1048
1046
and typically contains an "access_token" key,
@@ -1054,6 +1052,7 @@ def acquire_token_interactive(
1054
1052
self ._client_capabilities , claims_challenge )
1055
1053
return self .client .obtain_token_by_browser (
1056
1054
scope = decorate_scope (scopes , self .client_id ) if scopes else None ,
1055
+ extra_scope_to_consent = extra_scopes_to_consent ,
1057
1056
redirect_uri = "http://localhost:{port}" .format (
1058
1057
# Hardcode the host, for now. AAD portal rejects 127.0.0.1 anyway
1059
1058
port = port or 0 ),
0 commit comments