public static class Unauthorized
extends java.lang.Object
Unauthorized
exception indicates that the user is not authorized to
perform the method.
API requests may include a security context containing user credentials. For example, the user credentials could be a SAML token, a user name and password, or the session identifier for a previously established session. Invoking the method may require that the user identified by those credentials has particular privileges on the method or on one or more resource identifiers passed to the method.
Examples:
Counterexamples:
Unauthenticated
exception would be used instead.
Unauthenticated
exception would
be used instead. Unauthenticated
exception would be used instead.
For security reasons, the Error.getData()
property in this exception is null
, and the Error.getMessages()
property in
this exception does not disclose why the user is not authorized to perform the
method. For example the messages would not disclose which privilege the user did
not have or which resource identifier the user did not have the required
privilege to access. The API documentation should indicate what privileges are
required.