AuthProvider class abstract

AuthProvider handles the authorization of requests.

Use an AuthProvider implementation as middleware in an ApiService. See also:

An AuthProvider handles authorization and populates the ApiRequest.session property as a result.

If requireAuthorization is set to false, a request without valid authorization is not immediately discarded with HTTP status code 401 but instead forwarded to the RequestHandler with ApiRequest.session = null.

Inheritance
Implementers

Constructors

AuthProvider(RequestHandler internal, {bool requireAuthorization = true})

Properties

hashCode int
The hash code for this object.
no setterinherited
internal → RequestHandler
finalinherited
requireAuthorization bool
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

authorizeRequest(ApiRequest request) Future<Session?>
handleRequest(ApiRequest request) Future<ApiResponse>
next(ApiRequest request) Future<ApiResponse>
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