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.
Modifier and Type | Method and Description |
---|---|
static
Authentication |
deserialize(Input Deserializes the AuthenticationRecord from the specified InputStream |
static
Mono<Authentication |
deserialize Deserializes the AuthenticationRecord from the specified InputStream |
String |
get Get the authority host used to authenticate the account. |
String |
get Get the client id of the application used for authentication. |
String |
get Get the unique identifier of the account. |
String |
get Get the tenant, which the account authenticated in. |
String |
get Get the user principal name of the account. |
void |
serialize(Output Serializes the AuthenticationRecord to the specified OutputStream |
Mono<Output |
serialize Serializes the AuthenticationRecord to the specified OutputStream |
Methods inherited from java.lang.Object
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:
Azure SDK for Java feedback
Azure SDK for Java is an open source project. Select a link to provide feedback: