GuardDefinition class
Declarative definition of a named authentication guard.
Constructors
- GuardDefinition.authenticated({String? realm = 'Restricted'})
-
Creates an authenticated guard using
realmfor its challenge.const -
GuardDefinition.roles({required List<
String> roles, bool any = false}) -
Creates a role guard requiring the configured
roles.const
Properties
- any → bool
-
Whether any role may satisfy the definition instead of all roles.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- realm → String?
-
Challenge realm for an authenticated guard.
final
-
roles
→ List<
String> -
Roles checked when type is GuardType.roles.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → GuardType
-
Guard kind selected by the named constructors.
final
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