1
+ =========================
1
2
MSAL Python Documentation
2
3
=========================
3
4
@@ -6,11 +7,11 @@ MSAL Python Documentation
6
7
:caption: Contents:
7
8
:hidden:
8
9
9
- index
10
-
11
10
..
12
11
Comment: Perhaps because of the theme, only the first level sections will show in TOC,
13
12
regardless of maxdepth setting.
13
+ UPDATE: And now (early 2024) suddenly a function-level, long TOC is generated,
14
+ even though maxdepth is set to 2.
14
15
15
16
You can find high level conceptual documentations in the project
16
17
`README <https://github.com/AzureAD/microsoft-authentication-library-for-python >`_.
@@ -23,7 +24,7 @@ MSAL Python supports some of them.
23
24
**The following diagram serves as a map. Locate your application scenario on the map. **
24
25
**If the corresponding icon is clickable, it will bring you to an MSAL Python sample for that scenario. **
25
26
26
- * Most authentication scenarios acquire tokens on behalf of signed-in users .
27
+ * Most authentication scenarios acquire tokens representing the signed-in user .
27
28
28
29
.. raw :: html
29
30
@@ -43,7 +44,7 @@ MSAL Python supports some of them.
43
44
alt =" Browserless app" title =" Browserless app" href =" https://github.com/Azure-Samples/ms-identity-python-devicecodeflow" >
44
45
</map >
45
46
46
- * 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.
47
48
48
49
.. raw :: html
49
50
@@ -63,26 +64,24 @@ MSAL Python supports some of them.
63
64
64
65
API Reference
65
66
=============
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.
66
77
67
78
The following section is the API Reference of MSAL Python.
68
- 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:
69
80
70
81
* You already followed our sample(s) above and have your app up and running,
71
82
but want to know more on how you could tweak the authentication experience
72
83
by using other optional parameters (there are plenty of them!)
73
- * You read the MSAL Python source code and found a helper function that is useful to you,
74
- then you would want to double check whether that helper is documented below.
75
- Only documented APIs are considered part of the MSAL Python public API,
76
- which are guaranteed to be backward-compatible in MSAL Python 1.x series.
77
- Undocumented internal helpers are subject to change anytime, without prior notice.
78
-
79
- .. note ::
80
-
81
- Only APIs and their parameters documented in this section are part of public API,
82
- with guaranteed backward compatibility for the entire 1.x series.
83
-
84
- Other modules in the source code are all considered as internal helpers,
85
- which could change at anytime in the future, without prior notice.
84
+ * Some important features have their in-depth documentations in the API Reference.
86
85
87
86
MSAL proposes a clean separation between
88
87
`public client applications and confidential client applications
@@ -92,7 +91,7 @@ They are implemented as two separated classes,
92
91
with different methods for different authentication scenarios.
93
92
94
93
ClientApplication
95
- =================
94
+ -----------------
96
95
97
96
.. autoclass :: msal.ClientApplication
98
97
:members:
@@ -101,22 +100,23 @@ ClientApplication
101
100
.. automethod :: __init__
102
101
103
102
PublicClientApplication
104
- =======================
103
+ -----------------------
105
104
106
105
.. autoclass :: msal.PublicClientApplication
107
106
:members:
108
107
108
+ .. autoattribute :: msal.PublicClientApplication.CONSOLE_WINDOW_HANDLE
109
109
.. automethod :: __init__
110
110
111
111
ConfidentialClientApplication
112
- =============================
112
+ -----------------------------
113
113
114
114
.. autoclass :: msal.ConfidentialClientApplication
115
115
:members:
116
116
117
117
118
118
TokenCache
119
- ==========
119
+ ----------
120
120
121
121
One of the parameters accepted by
122
122
both `PublicClientApplication ` and `ConfidentialClientApplication `
@@ -130,3 +130,41 @@ See `SerializableTokenCache` for example.
130
130
131
131
.. autoclass :: msal.SerializableTokenCache
132
132
:members:
133
+
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
143
+
144
+ PopAuthScheme
145
+ -------------
146
+
147
+ This is used as the `auth_scheme ` parameter in many of the acquire token methods
148
+ to support for Proof of Possession (PoP) tokens.
149
+
150
+ New in MSAL Python 1.26
151
+
152
+ .. autoclass :: msal.PopAuthScheme
153
+ :members:
154
+
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
160
+ .. automethod :: __init__
161
+
162
+
163
+ Exceptions
164
+ ----------
165
+ These are exceptions that MSAL Python may raise.
166
+ You should not need to create them directly.
167
+ You may want to catch them to provide a better error message to your end users.
168
+
169
+ .. autoclass :: msal.IdTokenError
170
+
0 commit comments