ApiKeyAuth<T> class

The ApiKeyAuth helpers check if

  • apiKey header is present
  • give you what is in the apiKey header in order to you to verify it's correct

apiKeyAuth 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

ApiKeyAuth(FutureOr<(bool, T)> apiKeyAuth(Request request, String value), {String apiKey = _headerApiKey})

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