AuthorizationException class

Thrown when a FormRequest.authorize check (or a controller authorize() call) denies the current actor.

Apps typically catch this at the controller boundary and surface either a 403 page or a toast. The optional message lets you give the user a hint when the default "Unauthorized." feels too terse.

Implemented types

Constructors

AuthorizationException([String message = 'Unauthorized.'])
const

Properties

hashCode int
The hash code for this object.
no setterinherited
message String
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.
override

Operators

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