Package jakarta.ws.rs

Class NotAuthorizedException

java.lang.Object
All Implemented Interfaces:
Serializable

public class NotAuthorizedException extends ClientErrorException
A runtime exception indicating request authorization failure caused by one of the following scenarios:
  • a client did not send the required authorization credentials to access the requested resource, i.e. Authorization HTTP header is missing in the request,
  • or - in case the request already contains the HTTP Authorization header - then the exception indicates that authorization has been refused for the credentials contained in the request header.
Since:
2.0
See Also: