Unauthorized
@Response(code=401, description="Unauthorized") @Deprecated public class Unauthorized extends RestException
Similar to
The response must include a WWW-Authenticate header field containing a challenge applicable to the requested resource.
401 semantically means "unauthenticated",i.e. the user does not have the necessary credentials.
Note: Some sites issue HTTP 401 when an IP address is banned from the website (usually the website domain) and that specific address is refused permission to access a website.
Modifier and Type | Field and Description |
---|---|
static int |
CODE
Deprecated.
HTTP status code
|
static String |
MESSAGE
Deprecated.
Default message
|
Constructor and Description |
---|
Unauthorized()
Deprecated.
Constructor.
|
Unauthorized(String msg)
Deprecated.
Constructor.
|
Unauthorized(String msg,
Object... args)
Deprecated.
Constructor.
|
Unauthorized(Throwable cause)
Deprecated.
Constructor.
|
Unauthorized(Throwable cause,
String msg,
Object... args)
Deprecated.
Constructor.
|
getFullStackMessage, getOccurrence, getRootCause, getStatus, hashCode, setOccurrence, setStatus, toString
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
public static final int CODE
public static final String MESSAGE
public Unauthorized(Throwable cause, String msg, Object... args)
cause
- The cause. Can be msg
- The message. Can be args
- Optional MessageFormat
-style arguments in the message.public Unauthorized(String msg)
msg
- The message. Can be public Unauthorized()
public Unauthorized(String msg, Object... args)
msg
- The message. Can be args
- Optional MessageFormat
-style arguments in the message.public Unauthorized(Throwable cause)
cause
- The cause. Can be Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.