AuthServerDelegate class

The methods used by an AuthServer to store information and customize behavior related to authorization.

An AuthServer requires an instance of this type to manage storage of ResourceOwners, AuthToken, AuthCode, and AuthClients. You may also customize the token format or add more granular authorization scope rules.

Prefer to use ManagedAuthDelegate from 'package:aqueduct/managed_auth.dart' instead of implementing this interface; there are important details to consider and test when implementing this interface.

Implementers

Constructors

AuthServerDelegate()

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

addClient(AuthServer server, AuthClient client) → FutureOr
Must store client. [...]
addCode(AuthServer server, AuthCode code) → FutureOr
Must store code. [...]
addToken(AuthServer server, AuthToken token, { AuthCode issuedFrom }) → FutureOr
Must store token. [...]
getAllowedScopes(ResourceOwner owner) → List<AuthScope>
Returns list of allowed scopes for a given ResourceOwner. [...]
getClient(AuthServer server, String clientID) → FutureOr<AuthClient>
Must return AuthClient for a client ID. [...]
getCode(AuthServer server, String code) → FutureOr<AuthCode>
Must return AuthCode for its identifiying code. [...]
getResourceOwner(AuthServer server, String username) → FutureOr<ResourceOwner>
Must return a ResourceOwner for a username. [...]
getToken(AuthServer server, { String byAccessToken, String byRefreshToken }) → FutureOr<AuthToken>
Returns a AuthToken searching by its access token or refresh token. [...]
removeClient(AuthServer server, String clientID) → FutureOr
Removes an AuthClient for a client ID. [...]
removeCode(AuthServer server, String code) → FutureOr
Must remove AuthCode identified by code. [...]
removeToken(AuthServer server, AuthCode grantedByCode) → FutureOr
Must delete a AuthToken granted by grantedByCode. [...]
removeTokens(AuthServer server, int resourceOwnerID) → FutureOr
This method must delete all AuthToken and AuthCodes for a ResourceOwner. [...]
updateToken(AuthServer server, String oldAccessToken, String newAccessToken, DateTime newIssueDate, DateTime newExpirationDate) → FutureOr
Must update AuthToken with [newAccessToken, [newIssueDate, newExpirationDate. [...]
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