你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
AuthenticationRecord Class
Non-secret account information for an authenticated user
This class enables DeviceCodeCredential and InteractiveBrowserCredential to access previously cached authentication data. Applications shouldn't construct instances of this class. They should instead acquire one from a credential's authenticate method, such as authenticate. See the user_authentication sample for more details.
- Inheritance
-
builtins.objectAuthenticationRecord
Constructor
AuthenticationRecord(tenant_id: str, client_id: str, authority: str, home_account_id: str, username: str)
Parameters
Name | Description |
---|---|
tenant_id
Required
|
The tenant the account should authenticate in. |
client_id
Required
|
The client ID of the application which performed the original authentication. |
authority
Required
|
The authority host used to authenticate the account. |
home_account_id
Required
|
A unique identifier of the account. |
username
Required
|
The user principal or service principal name of the account. |
Methods
deserialize |
Deserialize a record. |
serialize |
Serialize the record. |
deserialize
Deserialize a record.
deserialize(data: str) -> AuthenticationRecord
Parameters
Name | Description |
---|---|
data
Required
|
A serialized record. |
Returns
Type | Description |
---|---|
The deserialized record. |
serialize
Attributes
authority
client_id
The client ID of the application which performed the original authentication.
Returns
Type | Description |
---|---|