AuthenticationRecord Class
- java.
lang. Object - com.
azure. identity. AuthenticationRecord
- com.
public final class AuthenticationRecord
Authentication Record represents the account information of the authenticated account. This is helpful in scenarios where applications require brokered authentication via DeviceCodeCredential or InteractiveBrowserCredential.
Authentication record is returned when authenticate() or authenticate() api is invoked. The returned auth record can be stored/persisted in the user application. Further, this record can be configured on the authenticationRecord(AuthenticationRecord authenticationRecord) or authenticationRecord(AuthenticationRecord authenticationRecord) to proactively indicate that a previously authenticated account should be used from the persisted cache instead of authenticating again.
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Authentication |
deserialize(InputStream inputStream)
Deserializes the AuthenticationRecord from the specified InputStream |
static
Mono<Authentication |
deserializeAsync(InputStream inputStream)
Deserializes the AuthenticationRecord from the specified InputStream |
String |
getAuthority()
Get the authority host used to authenticate the account. |
String |
getClientId()
Get the client id of the application used for authentication. |
String |
getHomeAccountId()
Get the unique identifier of the account. |
String |
getTenantId()
Get the tenant, which the account authenticated in. |
String |
getUsername()
Get the user principal name of the account. |
void |
serialize(OutputStream outputStream)
Serializes the AuthenticationRecord to the specified OutputStream |
Mono<Output |
serializeAsync(OutputStream outputStream)
Serializes the AuthenticationRecord to the specified OutputStream |
Methods inherited from java.lang.Object
Method Details
deserialize
public static AuthenticationRecord deserialize(InputStream inputStream)
Deserializes the AuthenticationRecord from the specified InputStream
Parameters:
Returns:
deserializeAsync
public static Mono
Deserializes the AuthenticationRecord from the specified InputStream
Parameters:
Returns:
getAuthority
public String getAuthority()
Get the authority host used to authenticate the account.
Returns:
getClientId
public String getClientId()
Get the client id of the application used for authentication.
Returns:
getHomeAccountId
public String getHomeAccountId()
Get the unique identifier of the account.
Returns:
getTenantId
public String getTenantId()
Get the tenant, which the account authenticated in.
Returns:
getUsername
public String getUsername()
Get the user principal name of the account.
Returns:
serialize
public void serialize(OutputStream outputStream)
Serializes the AuthenticationRecord to the specified OutputStream
Parameters:
serializeAsync
public Mono
Serializes the AuthenticationRecord to the specified OutputStream
Parameters:
Returns:
Applies to
Azure SDK for Java