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.
Constructors
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
Operators
-
operator ==(
other) → bool -
The equality operator.
inherited
Methods
-
fetchAuthCodeByCode(
AuthServer server, String code) → Future<AuthCode> -
Asks this instance to retrieve an auth code from provided
code
. -
fetchAuthenticatableByUsername(
AuthServer server, String username) → Future<Authenticatable> -
Returns an Authenticatable for an
username
. -
fetchClientByID(
AuthServer server, String clientID) → Future<AuthClient> -
Returns an AuthClient for a client ID.
-
fetchTokenByAccessToken(
AuthServer server, String accessToken) → Future<AuthToken> -
Returns a AuthToken for an
accessToken
. -
fetchTokenByRefreshToken(
AuthServer server, String refreshToken) → Future<AuthToken> -
Returns a AuthToken for an
refreshToken
. -
refreshTokenWithAccessToken(
AuthServer server, String oldAccessToken, String newAccessToken, DateTime newIssueDate, DateTime newExpirationDate) → Future -
Asks this instance to update an existing AuthToken for
server
. -
revokeAuthCodeWithCode(
AuthServer server, String code) → Future -
Asks this instance to delete an existing AuthCode for
server
. -
revokeAuthenticatableWithIdentifier(
AuthServer server, identifier) → Future -
This method must revoke all AuthToken and AuthCodes for an Authenticatable.
-
revokeClientWithID(
AuthServer server, String clientID) → Future -
Revokes an AuthClient for a client ID.
-
revokeTokenIssuedFromCode(
AuthServer server, AuthCode authCode) → Future -
storeAuthCode(
AuthServer server, AuthCode ac) → Future -
Asks this instance to store a AuthCode for
server
. -
storeToken(
AuthServer server, AuthToken t, { AuthCode issuedFrom }) → Future -
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