Skip to content

Commit b286540

Browse files
committed
Adding attributes that were not auto documented
1 parent 4b34dd6 commit b286540

File tree

3 files changed

+47
-31
lines changed

3 files changed

+47
-31
lines changed

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
#
6363
# This is also used if you do content translation via gettext catalogs.
6464
# Usually you set "language" from the command line for these cases.
65-
language = None
65+
language = "en"
6666

6767
# List of patterns, relative to source directory, that match files and
6868
# directories to ignore when looking for source files.
@@ -95,7 +95,7 @@
9595
# Add any paths that contain custom static files (such as style sheets) here,
9696
# relative to this directory. They are copied after the builtin static files,
9797
# so a file named "default.css" will overwrite the builtin "default.css".
98-
html_static_path = ['_static']
98+
#html_static_path = ['_static']
9999

100100
# Custom sidebar templates, must be a dictionary that maps document names
101101
# to template names.

docs/index.rst

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ MSAL Python Documentation
77
:caption: Contents:
88
:hidden:
99

10-
index
11-
1210
..
1311
Comment: Perhaps because of the theme, only the first level sections will show in TOC,
1412
regardless of maxdepth setting.
@@ -26,7 +24,7 @@ MSAL Python supports some of them.
2624
**The following diagram serves as a map. Locate your application scenario on the map.**
2725
**If the corresponding icon is clickable, it will bring you to an MSAL Python sample for that scenario.**
2826

29-
* Most authentication scenarios acquire tokens on behalf of signed-in users.
27+
* Most authentication scenarios acquire tokens representing the signed-in user.
3028

3129
.. raw:: html
3230

@@ -46,7 +44,7 @@ MSAL Python supports some of them.
4644
alt="Browserless app" title="Browserless app" href="https://github.com/Azure-Samples/ms-identity-python-devicecodeflow">
4745
</map>
4846

49-
* There are also daemon apps. In these scenarios, applications acquire tokens on behalf of themselves with no user.
47+
* There are also daemon apps, who acquire tokens representing themselves, not a user.
5048

5149
.. raw:: html
5250

@@ -66,26 +64,24 @@ MSAL Python supports some of them.
6664

6765
API Reference
6866
=============
67+
.. note::
68+
69+
Only the contents inside
70+
`this source file <https://github.com/AzureAD/microsoft-authentication-library-for-python/blob/dev/msal/__init__.py>`_
71+
and their documented methods (unless otherwise marked as deprecated)
72+
are MSAL Python public API,
73+
which are guaranteed to be backward-compatible until the next major version.
74+
75+
Everything else, regardless of their naming, are all internal helpers,
76+
which could change at anytime in the future, without prior notice.
6977

7078
The following section is the API Reference of MSAL Python.
71-
The API Reference is like a dictionary. You **read this API section when and only when**:
79+
The API Reference is like a dictionary, which is useful when:
7280

7381
* You already followed our sample(s) above and have your app up and running,
7482
but want to know more on how you could tweak the authentication experience
7583
by using other optional parameters (there are plenty of them!)
76-
* You read the MSAL Python source code and found a helper function that is useful to you,
77-
then you would want to double check whether that helper is documented below.
78-
Only documented APIs are considered part of the MSAL Python public API,
79-
which are guaranteed to be backward-compatible in MSAL Python 1.x series.
80-
Undocumented internal helpers are subject to change anytime, without prior notice.
81-
82-
.. note::
83-
84-
Only APIs and their parameters documented in this section are part of public API,
85-
with guaranteed backward compatibility for the entire 1.x series.
86-
87-
Other modules in the source code are all considered as internal helpers,
88-
which could change at anytime in the future, without prior notice.
84+
* Some important features have their in-depth documentations in the API Reference.
8985

9086
MSAL proposes a clean separation between
9187
`public client applications and confidential client applications
@@ -109,6 +105,7 @@ PublicClientApplication
109105
.. autoclass:: msal.PublicClientApplication
110106
:members:
111107

108+
.. autoattribute:: msal.PublicClientApplication.CONSOLE_WINDOW_HANDLE
112109
.. automethod:: __init__
113110

114111
ConfidentialClientApplication
@@ -134,6 +131,15 @@ See `SerializableTokenCache` for example.
134131
.. autoclass:: msal.SerializableTokenCache
135132
:members:
136133

134+
Prompt
135+
------
136+
.. autoclass:: msal.Prompt
137+
:members:
138+
139+
.. autoattribute:: msal.Prompt.SELECT_ACCOUNT
140+
.. autoattribute:: msal.Prompt.NONE
141+
.. autoattribute:: msal.Prompt.CONSENT
142+
.. autoattribute:: msal.Prompt.LOGIN
137143

138144
PopAuthScheme
139145
-------------
@@ -146,6 +152,11 @@ New in MSAL Python 1.26
146152
.. autoclass:: msal.PopAuthScheme
147153
:members:
148154

155+
.. autoattribute:: msal.PopAuthScheme.HTTP_GET
156+
.. autoattribute:: msal.PopAuthScheme.HTTP_POST
157+
.. autoattribute:: msal.PopAuthScheme.HTTP_PUT
158+
.. autoattribute:: msal.PopAuthScheme.HTTP_DELETE
159+
.. autoattribute:: msal.PopAuthScheme.HTTP_PATCH
149160
.. automethod:: __init__
150161

151162

msal/application.py

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -737,10 +737,11 @@ def initiate_auth_code_flow(
737737
maintain state between the request and callback.
738738
If absent, this library will automatically generate one internally.
739739
:param str prompt:
740-
By default, no prompt value will be sent, not even "none".
740+
By default, no prompt value will be sent, not even string ``"none"``.
741741
You will have to specify a value explicitly.
742-
Its valid values are defined in Open ID Connect specs
743-
https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest
742+
Its valid values are the constants defined in
743+
:class:`Prompt <msal.Prompt>`.
744+
744745
:param str login_hint:
745746
Optional. Identifier of the user. Generally a User Principal Name (UPN).
746747
:param domain_hint:
@@ -840,10 +841,10 @@ def get_authorization_request_url(
840841
`not recommended <https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-implicit-grant-flow#is-the-implicit-grant-suitable-for-my-app>`_.
841842
842843
:param str prompt:
843-
By default, no prompt value will be sent, not even "none".
844+
By default, no prompt value will be sent, not even string ``"none"``.
844845
You will have to specify a value explicitly.
845-
Its valid values are defined in Open ID Connect specs
846-
https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest
846+
Its valid values are the constants defined in
847+
:class:`Prompt <msal.Prompt>`.
847848
:param nonce:
848849
A cryptographically random value used to mitigate replay attacks. See also
849850
`OIDC specs <https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest>`_.
@@ -1819,10 +1820,10 @@ def acquire_token_interactive(
18191820
:param list scopes:
18201821
It is a list of case-sensitive strings.
18211822
:param str prompt:
1822-
By default, no prompt value will be sent, not even "none".
1823+
By default, no prompt value will be sent, not even string ``"none"``.
18231824
You will have to specify a value explicitly.
1824-
Its valid values are defined in Open ID Connect specs
1825-
https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest
1825+
Its valid values are the constants defined in
1826+
:class:`Prompt <msal.Prompt>`.
18261827
:param str login_hint:
18271828
Optional. Identifier of the user. Generally a User Principal Name (UPN).
18281829
:param domain_hint:
@@ -1867,11 +1868,15 @@ def acquire_token_interactive(
18671868
New in version 1.15.
18681869
18691870
:param int parent_window_handle:
1870-
OPTIONAL. If your app is a GUI app running on modern Windows system,
1871-
and your app opts in to use broker,
1871+
Required if your app is running on Windows and opted in to use broker.
1872+
1873+
If your app is a GUI app,
18721874
you are recommended to also provide its window handle,
18731875
so that the sign in UI window will properly pop up on top of your window.
18741876
1877+
If your app is a console app (most Python scripts are console apps),
1878+
you can use a placeholder value ``msal.PublicClientApplication.CONSOLE_WINDOW_HANDLE``.
1879+
18751880
New in version 1.20.0.
18761881
18771882
:param function on_before_launching_ui:

0 commit comments

Comments
 (0)