AuthStorage class

An interface for implementing storage behavior for an AuthServer.

This interface is responsible for persisting and retrieving information generated and requested by an AuthServer. For a concrete, tested implementation of this class, see ManagedAuthStorage in package:aqueduct/managed_auth.dart.

An AuthServer does not dictate how information is stored and therefore can't dictate how information is disposed of. It is up to implementors of this class to discard of any information it no longer wants to keep.

Implemented by

Constructors

AuthStorage()

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

allowedScopesForAuthenticatable(Authenticatable authenticatable) List<AuthScope>
Returns list of allowed scopes for a given Authenticatable. [...]
fetchAuthCodeByCode(AuthServer server, String code) FutureOr<AuthCode>
Asks this instance to retrieve an auth code from provided code. [...]
fetchAuthenticatableByUsername(AuthServer server, String username) FutureOr<Authenticatable>
Returns an Authenticatable for an username. [...]
fetchClientByID(AuthServer server, String clientID) FutureOr<AuthClient>
Returns an AuthClient for a client ID. [...]
fetchTokenByAccessToken(AuthServer server, String accessToken) FutureOr<AuthToken>
Returns a AuthToken for an accessToken. [...]
fetchTokenByRefreshToken(AuthServer server, String refreshToken) FutureOr<AuthToken>
Returns a AuthToken for an refreshToken. [...]
refreshTokenWithAccessToken(AuthServer server, String oldAccessToken, String newAccessToken, DateTime newIssueDate, DateTime newExpirationDate) FutureOr
Asks this instance to update an existing AuthToken for server. [...]
revokeAuthCodeWithCode(AuthServer server, String code) FutureOr
Asks this instance to delete an existing AuthCode for server. [...]
revokeAuthenticatableWithIdentifier(AuthServer server, dynamic identifier) FutureOr
This method must revoke all AuthToken and AuthCodes for an Authenticatable. [...]
revokeClientWithID(AuthServer server, String clientID) FutureOr
Revokes an AuthClient for a client ID. [...]
revokeTokenIssuedFromCode(AuthServer server, AuthCode authCode) FutureOr
Deletes a AuthToken by its issuing AuthCode. [...]
storeAuthCode(AuthServer server, AuthCode ac) FutureOr
Asks this instance to store a AuthCode for server. [...]
storeToken(AuthServer server, AuthToken t, { AuthCode issuedFrom }) FutureOr
Asks this instance to store a AuthToken for server. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited