AuthServerDelegate class Null safety

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:conduit_core/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-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

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.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
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.
toString() String
A string representation of this object.
inherited
updateToken(AuthServer server, String? oldAccessToken, String? newAccessToken, DateTime? newIssueDate, DateTime? newExpirationDate) FutureOr
Must update AuthToken with [newAccessToken, [newIssueDate, newExpirationDate.

Operators

operator ==(Object other) bool
The equality operator.
inherited