public class AuthenticationException extends BaseServerResponseException
For security failures, you should use
AuthenticationException if you want to indicate that the
user could not be authenticated (e.g. credential failures), also
known as an authentication failure.
You should use ForbiddenOperationException if you want to
indicate that the authenticated user does not have permission to
perform the requested operation, also known as an authorization
failure.
Note that a complete list of RESTful exceptions is available in the Package Summary.
| Modifier and Type | Field and Description |
|---|---|
static int |
STATUS_CODE |
| Constructor and Description |
|---|
AuthenticationException() |
AuthenticationException(String theMessage) |
AuthenticationException(String theMessage,
Throwable theCause) |
| Modifier and Type | Method and Description |
|---|---|
AuthenticationException |
addAuthenticateHeaderForRealm(String theRealm)
Adds a
WWW-Authenticate header to the response, of the form:WWW-Authenticate: Basic realm="theRealm" |
addResponseHeader, getAdditionalMessages, getOperationOutcome, getResponseBody, getResponseHeaders, getResponseMimeType, getStatusCode, hasResponseHeaders, isErrorMessageTrusted, newInstance, setErrorMessageTrusted, setOperationOutcome, setResponseBody, setResponseMimeTypeaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic static final int STATUS_CODE
public AuthenticationException()
public AuthenticationException(String theMessage)
public AuthenticationException(String theMessage, Throwable theCause)
public AuthenticationException addAuthenticateHeaderForRealm(String theRealm)
WWW-Authenticate header to the response, of the form:WWW-Authenticate: Basic realm="theRealm"this for easy method chainingCopyright © 2014–2019 University Health Network. All rights reserved.