@@ -156,6 +156,9 @@ def obtain_token_by_username_password(self, username, password, **kwargs):
156
156
157
157
158
158
class ClientApplication (object ):
159
+ """You do not usually directly use this class. Use its subclasses instead:
160
+ :class:`PublicClientApplication` and :class:`ConfidentialClientApplication`.
161
+ """
159
162
ACQUIRE_TOKEN_SILENT_ID = "84"
160
163
ACQUIRE_TOKEN_BY_REFRESH_TOKEN = "85"
161
164
ACQUIRE_TOKEN_BY_USERNAME_PASSWORD_ID = "301"
@@ -319,7 +322,7 @@ def __init__(
319
322
to keep their traffic remain inside that region.
320
323
321
324
As of 2021 May, regional service is only available for
322
- ``acquire_token_for_client()`` sent by any of the following scenarios::
325
+ ``acquire_token_for_client()`` sent by any of the following scenarios:
323
326
324
327
1. An app powered by a capable MSAL
325
328
(MSAL Python 1.12+ will be provisioned)
@@ -764,9 +767,9 @@ def initiate_auth_code_flow(
764
767
Can be one of "consumers" or "organizations" or your tenant domain "contoso.com".
765
768
If included, it will skip the email-based discovery process that user goes
766
769
through on the sign-in page, leading to a slightly more streamlined user experience.
767
- More information on possible values
768
- `here <https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow#request-an-authorization-code>`_ and
769
- `here <https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-oapx/86fb452d-e34a-494e-ac61-e526e263b6d8>`_.
770
+ More information on possible values available in
771
+ `Auth Code Flow doc <https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow#request-an-authorization-code>`_ and
772
+ `domain_hint doc <https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-oapx/86fb452d-e34a-494e-ac61-e526e263b6d8>`_.
770
773
771
774
:param int max_age:
772
775
OPTIONAL. Maximum Authentication Age.
@@ -804,7 +807,7 @@ def initiate_auth_code_flow(
804
807
"...": "...", // Everything else are reserved and internal
805
808
}
806
809
807
- The caller is expected to::
810
+ The caller is expected to:
808
811
809
812
1. somehow store this content, typically inside the current session,
810
813
2. guide the end user (i.e. resource owner) to visit that auth_uri,
@@ -868,9 +871,9 @@ def get_authorization_request_url(
868
871
Can be one of "consumers" or "organizations" or your tenant domain "contoso.com".
869
872
If included, it will skip the email-based discovery process that user goes
870
873
through on the sign-in page, leading to a slightly more streamlined user experience.
871
- More information on possible values
872
- `here <https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow#request-an-authorization-code>`_ and
873
- `here <https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-oapx/86fb452d-e34a-494e-ac61-e526e263b6d8>`_.
874
+ More information on possible values available in
875
+ `Auth Code Flow doc <https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow#request-an-authorization-code>`_ and
876
+ `domain_hint doc <https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-oapx/86fb452d-e34a-494e-ac61-e526e263b6d8>`_.
874
877
:param claims_challenge:
875
878
The claims_challenge parameter requests specific claims requested by the resource provider
876
879
in the form of a claims_challenge directive in the www-authenticate header to be
@@ -1682,6 +1685,9 @@ class PublicClientApplication(ClientApplication): # browser app or mobile app
1682
1685
CONSOLE_WINDOW_HANDLE = object ()
1683
1686
1684
1687
def __init__ (self , client_id , client_credential = None , ** kwargs ):
1688
+ """Same as :func:`ClientApplication.__init__`,
1689
+ except that ``client_credential`` parameter shall remain ``None``.
1690
+ """
1685
1691
if client_credential is not None :
1686
1692
raise ValueError ("Public Client should not possess credentials" )
1687
1693
super (PublicClientApplication , self ).__init__ (
@@ -1722,9 +1728,9 @@ def acquire_token_interactive(
1722
1728
Can be one of "consumers" or "organizations" or your tenant domain "contoso.com".
1723
1729
If included, it will skip the email-based discovery process that user goes
1724
1730
through on the sign-in page, leading to a slightly more streamlined user experience.
1725
- More information on possible values
1726
- `here <https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow#request-an-authorization-code>`_ and
1727
- `here <https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-oapx/86fb452d-e34a-494e-ac61-e526e263b6d8>`_.
1731
+ More information on possible values available in
1732
+ `Auth Code Flow doc <https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow#request-an-authorization-code>`_ and
1733
+ `domain_hint doc <https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-oapx/86fb452d-e34a-494e-ac61-e526e263b6d8>`_.
1728
1734
1729
1735
:param claims_challenge:
1730
1736
The claims_challenge parameter requests specific claims requested by the resource provider
@@ -1994,6 +2000,9 @@ def acquire_token_by_device_flow(self, flow, claims_challenge=None, **kwargs):
1994
2000
1995
2001
1996
2002
class ConfidentialClientApplication (ClientApplication ): # server-side web app
2003
+ """Same as :func:`ClientApplication.__init__`,
2004
+ except that ``allow_broker`` parameter shall remain ``None``.
2005
+ """
1997
2006
1998
2007
def acquire_token_for_client (self , scopes , claims_challenge = None , ** kwargs ):
1999
2008
"""Acquires token for the current confidential client, not for an end user.
0 commit comments