IAuthMiddleware class abstract

A middleware that logs a user in.

A package that serves many routes behind one endpoint (like GraphQL) uses it to find the user without blocking guests.

Implemented types

Constructors

IAuthMiddleware()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

asOptional() → IAuthMiddleware
Gives the same middleware (with the same guards) that lets guests through. A good login sets req.auth. No login, or a bad token, goes on with req.auth null.
handle(IDoxRequest req) → dynamic
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