/
azure.core.credentials.TokenCredential.yml
46 lines (44 loc) · 1.44 KB
/
azure.core.credentials.TokenCredential.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
### YamlMime:PythonClass
uid: azure.core.credentials.TokenCredential
name: TokenCredential
fullName: azure.core.credentials.TokenCredential
module: azure.core.credentials
inheritances:
- typing_extensions.Protocol
summary: Protocol for classes able to provide OAuth tokens.
constructor:
syntax: TokenCredential(*args, **kwargs)
methods:
- uid: azure.core.credentials.TokenCredential.get_token
name: get_token
summary: Request an access token for *scopes*.
signature: 'get_token(*scopes: str, claims: str | None = None, tenant_id: str |
None = None, enable_cae: bool = False, **kwargs: Any) -> AccessToken'
parameters:
- name: scopes
description: The type of access needed.
isRequired: true
types:
- <xref:str>
keywordOnlyParameters:
- name: claims
description: 'Additional claims required in the token, such as those returned
in a resource
provider''s claims challenge following an authorization failure.'
types:
- <xref:str>
- name: tenant_id
description: Optional tenant to include in the token request.
types:
- <xref:str>
- name: enable_cae
description: 'Indicates whether to enable Continuous Access Evaluation (CAE) for
the requested
token. Defaults to False.'
types:
- <xref:bool>
return:
description: An AccessToken instance containing the token string and its expiration
time in Unix time.
types:
- <xref:azure.core.credentials.AccessToken>