AuthResponse class final
Result of an authorization check with an optional message and code.
Constructors
- AuthResponse.allow([String? message])
-
const
- AuthResponse.deny([String? message = 'This action is unauthorized.', Object? code])
-
const
Properties
Methods
- Throws AuthorizationException when denied.
-
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
Static Methods
-
from(
Object? result) → AuthResponse - Coerces a callback result into a response.