forked from MicrosoftDocs/azure-docs-sdk-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
adal.authentication_context.AuthenticationContext.yml
386 lines (334 loc) · 12.2 KB
/
adal.authentication_context.AuthenticationContext.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
### YamlMime:PythonClass
uid: adal.authentication_context.AuthenticationContext
name: AuthenticationContext
fullName: adal.authentication_context.AuthenticationContext
module: adal.authentication_context
inheritances:
- builtins.object
summary: "Retrieves authentication tokens from Azure Active Directory.\n\nFor usages,\
\ check out the \"sample\" folder at:\n [https://github.com/AzureAD/azure-activedirectory-library-for-python](https://github.com/AzureAD/azure-activedirectory-library-for-python)\n\
\nCreates a new AuthenticationContext object.\n\nBy default the authority will be\
\ checked against a list of known Azure\nActive Directory authorities. If the authority\
\ is not recognized as\none of these well known authorities then token acquisition\
\ will fail.\nThis behavior can be turned off via the validate_authority parameter\n\
below."
constructor:
syntax: AuthenticationContext(authority, validate_authority=None, cache=None, api_version=None,
timeout=None, enable_pii=False, verify_ssl=None, proxies=None)
parameters:
- name: authority
description: 'A URL that identifies a token authority. It should be of the
format [https://login.microsoftonline.com/your_tenant](https://login.microsoftonline.com/your_tenant)'
isRequired: true
types:
- <xref:str>
- name: validate_authority
description: '(optional) Turns authority validation
on or off. This parameter default to true.'
defaultValue: None
types:
- <xref:bool>
- name: cache
description: '(optional) Sets the token cache used by this
AuthenticationContext instance. If this parameter is not set, then
a default is used. Cache instances is only used by that instance of
the AuthenticationContext and are not shared unless it has been
manually passed during the construction of other
AuthenticationContexts.'
defaultValue: None
types:
- <xref:adal.token_cache.TokenCache>
- name: api_version
description: '(optional) Specifies API version using on the wire.
Historically it has a hardcoded default value as "1.0".
Developers have been encouraged to set it as None explicitly,
which means the underlying API version will be automatically chosen.
Starting from ADAL Python 1.0, this default value becomes None.'
defaultValue: None
- name: timeout
description: '(optional) requests timeout. How long to wait for the server to
send
data before giving up, as a float, or a *(connect timeout,
read timeout) <timeouts>* tuple.'
defaultValue: None
- name: enable_pii
description: '(optional) Unless this is set to True,
there will be no Personally Identifiable Information (PII) written in log.'
defaultValue: 'False'
- name: verify_ssl
description: '(optional) requests verify. Either a boolean, in which case it
controls whether we verify the server''s TLS certificate, or a string, in which
case it must be a path to a CA bundle to use. If this value is not provided,
and
ADAL_PYTHON_SSL_NO_VERIFY env varaible is set, behavior is equivalent to
verify_ssl=False.'
defaultValue: None
- name: proxies
description: '(optional) requests proxies. Dictionary mapping protocol to the
URL
of the proxy. See [http://docs.python-requests.org/en/master/user/advanced/#proxies](http://docs.python-requests.org/en/master/user/advanced/#proxies)
for details.'
defaultValue: None
methods:
- uid: adal.authentication_context.AuthenticationContext.acquire_token
name: acquire_token
summary: Gets a token for a given resource via cached tokens.
signature: acquire_token(resource, user_id, client_id)
parameters:
- name: resource
description: 'A URI that identifies the resource for which the
token is valid.'
isRequired: true
types:
- <xref:str>
- name: user_id
description: 'The username of the user on behalf this application
is authenticating.'
isRequired: true
types:
- <xref:str>
- name: client_id
description: The OAuth client id of the calling application.
isRequired: true
types:
- <xref:str>
return:
description: 'dic with several keys, include "accessToken" and
"refreshToken".'
- uid: adal.authentication_context.AuthenticationContext.acquire_token_with_authorization_code
name: acquire_token_with_authorization_code
summary: 'Gets a token for a given resource via authorization code for a
server app.'
signature: acquire_token_with_authorization_code(authorization_code, redirect_uri,
resource, client_id, client_secret=None, code_verifier=None)
parameters:
- name: authorization_code
description: 'An authorization code returned from a
client.'
isRequired: true
types:
- <xref:str>
- name: redirect_uri
description: 'the redirect uri that was used in the
authorize call.'
isRequired: true
types:
- <xref:str>
- name: resource
description: 'A URI that identifies the resource for which the
token is valid.'
isRequired: true
types:
- <xref:str>
- name: client_id
description: The OAuth client id of the calling application.
isRequired: true
types:
- <xref:str>
- name: client_secret
description: '(only for confidential clients)The OAuth
client secret of the calling application. This parameter if not set,
defaults to None'
defaultValue: None
types:
- <xref:str>
- name: code_verifier
description: '(optional)The code verifier that was used to
obtain authorization code if PKCE was used in the authorization
code grant request.(usually used by public clients) This parameter if not set,
defaults to None'
defaultValue: None
types:
- <xref:str>
return:
description: 'dict with several keys, include "accessToken" and
"refreshToken".'
- uid: adal.authentication_context.AuthenticationContext.acquire_token_with_client_certificate
name: acquire_token_with_client_certificate
summary: Gets a token for a given resource via certificate credentials
signature: acquire_token_with_client_certificate(resource, client_id, certificate,
thumbprint, public_certificate=None)
parameters:
- name: resource
description: 'A URI that identifies the resource for which the
token is valid.'
isRequired: true
types:
- <xref:str>
- name: client_id
description: The OAuth client id of the calling application.
isRequired: true
types:
- <xref:str>
- name: certificate
description: A PEM encoded certificate private key.
isRequired: true
types:
- <xref:str>
- name: thumbprint
description: hex encoded thumbprint of the certificate.
isRequired: true
types:
- <xref:str>
- name: public_certificate
description: 'if not None, it will be sent to the service for subject name
and issuer based authentication, which is to support cert auto rolls. The value
must match the
certificate private key parameter.'
defaultValue: None
types:
- <xref:optional>
return:
description: dict with several keys, include "accessToken".
- uid: adal.authentication_context.AuthenticationContext.acquire_token_with_client_credentials
name: acquire_token_with_client_credentials
summary: Gets a token for a given resource via client credentials.
signature: acquire_token_with_client_credentials(resource, client_id, client_secret)
parameters:
- name: resource
description: 'A URI that identifies the resource for which the
token is valid.'
isRequired: true
types:
- <xref:str>
- name: client_id
description: The OAuth client id of the calling application.
isRequired: true
types:
- <xref:str>
- name: client_secret
description: The OAuth client secret of the calling application.
isRequired: true
types:
- <xref:str>
return:
description: dict with several keys, include "accessToken".
- uid: adal.authentication_context.AuthenticationContext.acquire_token_with_device_code
name: acquire_token_with_device_code
summary: Gets a new access token using via a device code.
signature: acquire_token_with_device_code(resource, user_code_info, client_id)
parameters:
- name: resource
description: 'A URI that identifies the resource for which the
token is valid.'
isRequired: true
types:
- <xref:str>
- name: user_code_info
description: 'The code info from the invocation of
"acquire_user_code"'
isRequired: true
types:
- <xref:dict>
- name: client_id
description: The OAuth client id of the calling application.
isRequired: true
types:
- <xref:str>
return:
description: 'dict with several keys, include "accessToken" and
"refreshToken".'
- uid: adal.authentication_context.AuthenticationContext.acquire_token_with_refresh_token
name: acquire_token_with_refresh_token
summary: Gets a token for a given resource via refresh tokens
signature: acquire_token_with_refresh_token(refresh_token, client_id, resource,
client_secret=None)
parameters:
- name: refresh_token
description: 'A refresh token returned in a tokne response
from a previous invocation of acquireToken.'
isRequired: true
types:
- <xref:str>
- name: client_id
description: The OAuth client id of the calling application.
isRequired: true
types:
- <xref:str>
- name: resource
description: 'A URI that identifies the resource for which the
token is valid.'
isRequired: true
types:
- <xref:str>
- name: client_secret
description: '(optional)The OAuth client secret of the
calling application.'
defaultValue: None
types:
- <xref:str>
return:
description: 'dict with several keys, include "accessToken" and
"refreshToken".'
- uid: adal.authentication_context.AuthenticationContext.acquire_token_with_username_password
name: acquire_token_with_username_password
summary: Gets a token for a given resource via user credentails.
signature: acquire_token_with_username_password(resource, username, password, client_id)
parameters:
- name: resource
description: 'A URI that identifies the resource for which the
token is valid.'
isRequired: true
types:
- <xref:str>
- name: username
description: 'The username of the user on behalf this
application is authenticating.'
isRequired: true
types:
- <xref:str>
- name: password
description: 'The password of the user named in the username
parameter.'
isRequired: true
types:
- <xref:str>
- name: client_id
description: The OAuth client id of the calling application.
isRequired: true
types:
- <xref:str>
return:
description: 'dict with several keys, include "accessToken" and
"refreshToken".'
- uid: adal.authentication_context.AuthenticationContext.acquire_user_code
name: acquire_user_code
summary: 'Gets the user code info which contains user_code, device_code for
authenticating user on device.'
signature: acquire_user_code(resource, client_id, language=None)
parameters:
- name: resource
description: 'A URI that identifies the resource for which the
device_code and user_code is valid for.'
isRequired: true
types:
- <xref:str>
- name: client_id
description: The OAuth client id of the calling application.
isRequired: true
types:
- <xref:str>
- name: language
description: 'The language code specifying how the message
should be localized to.'
defaultValue: None
types:
- <xref:str>
return:
description: dict contains code and uri for users to login through browser.
- uid: adal.authentication_context.AuthenticationContext.cancel_request_to_get_token_with_device_code
name: cancel_request_to_get_token_with_device_code
summary: Cancels the polling request to get token with device code.
signature: cancel_request_to_get_token_with_device_code(user_code_info)
parameters:
- name: user_code_info
description: 'The code info from the invocation of
"acquire_user_code"'
isRequired: true
types:
- <xref:dict>
return:
description: None
attributes:
- uid: adal.authentication_context.AuthenticationContext.options
name: options