InMemoryOAuthAccessTokenStore class
In-memory access token store for tests and development.
- Implemented types
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
captureDeletionState(
) → Object -
Captures a copy of the token map for deletion rollback.
override
-
deleteExpired(
{DateTime? now}) → Future< int> -
Removes and counts tokens whose access and refresh lifetimes have ended.
override
-
deleteUserDataForDeletion(
String userId) → Future< void> -
Revokes this user's token data for account deletion.
override
-
findByRefreshToken(
String refreshToken) → Future< OAuthAccessToken?> -
Finds a token by its raw refresh-token value; blank input returns null.
override
-
findByToken(
String token) → Future< OAuthAccessToken?> -
Finds a token by hashing
token; blank input returns null.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
restoreDeletionState(
Object checkpoint) → void -
Restores a checkpoint created by captureDeletionState.
override
-
revoke(
String token) → Future< void> -
Revokes the token represented by
token; blank input is ignored.override -
revokeAllForClient(
String clientId) → Future< int> -
Revokes and counts all tokens issued to
clientId.override -
revokeAllForUser(
String userId) → Future< int> -
Revokes and counts all tokens owned by
userId.override -
rotateRefreshToken(
{required String refreshToken, required String expectedTokenHash, required OAuthAccessToken replacement, int? maxUses}) → Future< OAuthAccessToken?> -
Atomically replaces a valid refresh-token record with
replacement.override -
save(
OAuthAccessToken token) → Future< void> -
Saves
tokenby digest, rejecting duplicate token hashes or authorization IDs.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited