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(String message,
Object challenge,
Object... moreChallenges)
Construct a new "not authorized" exception.
|
NotAuthorizedException(String message,
Response response)
Construct a new "not authorized" exception.
|
NotAuthorizedException(String message,
Response response,
Throwable cause)
Construct a new "not authorized" exception.
|
NotAuthorizedException(String message,
Throwable cause,
Object challenge,
Object... moreChallenges)
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.
|
getResponse
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public 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(String message, Object challenge, Object... moreChallenges)
message
- the detail message (which is saved for later retrieval by the Throwable.getMessage()
method).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)
response
- error response.IllegalArgumentException
- in case the status code set in the response is not HTTP 401
.public NotAuthorizedException(String message, Response response)
message
- the detail message (which is saved for later retrieval by the Throwable.getMessage()
method).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(String message, Throwable cause, Object challenge, Object... moreChallenges)
message
- the detail message (which is saved for later retrieval by the Throwable.getMessage()
method).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)
response
- error response.cause
- the underlying cause of the exception.IllegalArgumentException
- in case the status code set in the response is not HTTP 401
.public NotAuthorizedException(String message, Response response, Throwable cause)
message
- the detail message (which is saved for later retrieval by the Throwable.getMessage()
method).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 © 2018,2020 Eclipse Foundation.
Use is subject to license terms.