java.lang.Object
java.lang.Throwable
java.lang.Exception
edu.iu.auth.IuAuthenticationException
- All Implemented Interfaces:
Serializable
Thrown by an incoming request handler to represent an authentication failure.
Should be caught and handled as 302 FOUND or 401 UNAUTHORIZED by an outbound web request boundary as appropriate to the authorization scenario and user-agent context. Should not be handled by application-layer business logic.Should not be thrown by components not directly responsible for authentication.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionIuAuthenticationException
(String challenge) Constructor.IuAuthenticationException
(String challenge, Throwable cause) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionGets the Location header value for redirecting the user-agent to next step in the authentication process, if appropriate for the context; may be null if the authorization scenario doesn't specify user-agent interaction.Gets the WWW-Authenticate header value to report to the user agent authentication failure.void
setLocation
(URI location) Sets the Location header value for redirecting the user-agent to next step in the authentication process, if appropriate for the context; may be null if the authorization scenario doesn't specify user-agent interaction.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
IuAuthenticationException
Constructor.- Parameters:
challenge
- WWW-Authenticate header value for informing the remote client of the endpoint authentication requirements.
-
IuAuthenticationException
Constructor.- Parameters:
challenge
- WWW-Authenticate header value for informing the remote client of the endpoint authentication requirements.cause
- Optional exception or error describing the authentication failure.
-
-
Method Details
-
getMessage
Gets the WWW-Authenticate header value to report to the user agent authentication failure.- Overrides:
getMessage
in classThrowable
- Returns:
- WWW-Authenticate header value
-
getLocation
Gets the Location header value for redirecting the user-agent to next step in the authentication process, if appropriate for the context; may be null if the authorization scenario doesn't specify user-agent interaction.- Returns:
- location
-
setLocation
Sets the Location header value for redirecting the user-agent to next step in the authentication process, if appropriate for the context; may be null if the authorization scenario doesn't specify user-agent interaction.- Parameters:
location
- location
-