BearerAuth<T> class
The BearerAuth helpers check if
- authorization header is present
- authorization header start with 'Bearer '
- give you what is after 'Bearer ' in order to you to verify it's correct
bearerAuth
parameter return a record type (bool, T) where T is defined by
you and represent the User
or something else that identify this authentication
Constructors
-
BearerAuth(FutureOr<
(bool, T)> bearerAuth(Request request, String authorization), {String prefix = _bearer})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
isAuthorizedWithData
→ Future<
(bool, T?)> Function(Request request) -
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
authenticate(
Request request) → Future< (bool, T?)> -
inherited
-
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
-
operator |(
Auth< T> other) → Auth<T> -
inherited