AuthenticationRequiredException Class
- java.
lang. Object - java.
lang. Throwable - java.
lang. Exception - java.
lang. RuntimeException - com.
azure. core. exception. AzureException - com.
azure. core. exception. HttpResponseException - com.
azure. core. exception. ClientAuthenticationException - com.
azure. identity. CredentialUnavailableException - com.
azure. identity. AuthenticationRequiredException
- com.
- com.
- com.
- com.
- com.
- java.
- java.
- java.
public final class AuthenticationRequiredException
extends CredentialUnavailableException
The Authentication Required Exception is thrown by InteractiveBrowserCredential and DeviceCodeCredential to indicate to the user that automatic authentication is disabled and authentication needs to be initiated via authenticate() or authenticate() APIs respectively before fetching an access token.
Constructor Summary
Constructor | Description |
---|---|
AuthenticationRequiredException(String message, TokenRequestContext request) |
Initializes a new instance of the AuthenticationRequiredException class. |
AuthenticationRequiredException(String message, TokenRequestContext request, Throwable cause) |
Initializes a new instance of the AuthenticationRequiredException class. |
Method Summary
Modifier and Type | Method and Description |
---|---|
Token |
getTokenRequestContext()
Get the details of the authentication request which resulted in the authentication failure. |
Methods inherited from HttpResponseException
Methods inherited from java.lang.Object
Methods inherited from java.lang.Throwable
Constructor Details
AuthenticationRequiredException
public AuthenticationRequiredException(String message, TokenRequestContext request)
Initializes a new instance of the AuthenticationRequiredException class.
Parameters:
AuthenticationRequiredException
public AuthenticationRequiredException(String message, TokenRequestContext request, Throwable cause)
Initializes a new instance of the AuthenticationRequiredException class.
Parameters:
Method Details
getTokenRequestContext
public TokenRequestContext getTokenRequestContext()
Get the details of the authentication request which resulted in the authentication failure.
Returns: