BasicAuth<T> class

The BasicAuth helpers check if

  • authorization header is present
  • authorization header start with 'Basic '
  • give you what is after 'Basic ' in order to you to verify it's correct

basicAuth parameter return a record type (bool, T) where T is defined by you and represent the User or something else that identify this authentication

Inheritance

Constructors

BasicAuth(FutureOr<(bool, T)> basicAuth(Request request, String authorization))

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