Class Unauthorized

All Implemented Interfaces:
Serializable, HttpMessage, HttpResponse

@Response @StatusCode(401) @Schema(description="Unauthorized") public class Unauthorized extends BasicHttpException
Exception representing an HTTP 401 (Unauthorized).

Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet been provided.
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.

See Also: