AuthenticationRecord 類別

已驗證使用者的非秘密帳戶資訊

這個類別可啟用 DeviceCodeCredentialInteractiveBrowserCredential 存取先前快取的驗證資料。 應用程式不應該建構這個類別的實例。 他們應該改為從認證的 驗證 方法取得一個,例如 authenticate 。 如需詳細資訊,請參閱user_authentication範例。

繼承
builtins.object
AuthenticationRecord

建構函式

AuthenticationRecord(tenant_id: str, client_id: str, authority: str, home_account_id: str, username: str)

參數

名稱 Description
tenant_id
必要
str

帳戶應該要驗證的租使用者。

client_id
必要
str

執行原始驗證之應用程式的用戶端識別碼。

authority
必要
str

用來驗證帳戶的授權主機。

home_account_id
必要
str

帳戶的唯一識別碼。

username
必要
str

帳戶的使用者主體或服務主體名稱。

方法

deserialize

還原序列化記錄。

serialize

序列化記錄。

deserialize

還原序列化記錄。

deserialize(data: str) -> AuthenticationRecord

參數

名稱 Description
data
必要
str

序列化的記錄。

傳回

類型 Description

已還原序列化的記錄。

serialize

序列化記錄。

serialize() -> str

傳回

類型 Description
str

序列化的記錄。

屬性

authority

用來驗證帳戶的授權主機。

傳回

類型 Description
str

client_id

執行原始驗證之應用程式的用戶端識別碼。

傳回

類型 Description
str

home_account_id

帳戶的唯一識別碼。

傳回

類型 Description
str

tenant_id

帳戶應該要驗證的租使用者。

傳回

類型 Description
str

username

帳戶的使用者主體或服務主體名稱。

傳回

類型 Description
str