AuthorizationDeniedException class

The AccessDeniedException thrown when an access check says no; it carries the result that denied.

Method security and the web starter's request rules throw it. A web request that fails with it is answered 403, or asked to log in (401 or a redirect) when the user is anonymous. Catch AccessDeniedException rather than this class unless you need the result.

Spring (Java): AuthorizationDeniedException.

Inheritance

Constructors

AuthorizationDeniedException(String message, AuthorizationResult result)
A denial with a log message and the result that denied.

Properties

cause → Object?
The lower-level error that led to this one, or null.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
message → String
What was denied, for logs; never sent to the client.
finalinherited
result → AuthorizationResult
The decision that denied; AuthorizationDecision.denied when the check abstained.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited