public class NotAuthorizedException extends ClientErrorException
Authorization HTTP header is missing
in the request,
Authorization header - then
the exception indicates that authorization has been refused for the credentials contained
in the request header.
| Constructor and Description |
|---|
NotAuthorizedException(Object challenge,
Object... moreChallenges)
Construct a new "not authorized" exception.
|
NotAuthorizedException(Response response)
Construct a new "not authorized" exception.
|
NotAuthorizedException(Response response,
Throwable cause)
Construct a new "not authorized" exception.
|
NotAuthorizedException(Throwable cause,
Object challenge,
Object... moreChallenges)
Construct a new "not authorized" exception.
|
| Modifier and Type | Method and Description |
|---|---|
List<Object> |
getChallenges()
Get the list of authorization challenges associated with the exception and
applicable to the resource requested by the client.
|
getResponseaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic NotAuthorizedException(Object challenge, Object... moreChallenges)
challenge - authorization challenge applicable to the resource requested
by the client.moreChallenges - additional authorization challenge applicable to the
requested resource.NullPointerException - in case the challenge parameter is null.public NotAuthorizedException(Response response) throws IllegalArgumentException
response - error response.IllegalArgumentException - in case the status code set in the response
is not HTTP 401.public NotAuthorizedException(Throwable cause, Object challenge, Object... moreChallenges)
cause - the underlying cause of the exception.challenge - authorization challenge applicable to the requested resource.moreChallenges - additional authorization challenge applicable to the
requested resource.public NotAuthorizedException(Response response, Throwable cause) throws IllegalArgumentException
response - error response.cause - the underlying cause of the exception.IllegalArgumentException - in case the status code set in the response
is not HTTP 401.Copyright © 2013. All Rights Reserved.