InMemoryOAuthAuthorizationCodeExchangeStore class final

In-memory atomic authorization-code exchange store.

This adapter is intended for tests and local development. It serializes exchanges and restores both maps when any fault occurs between code consumption and token persistence.

Implemented types

Constructors

InMemoryOAuthAuthorizationCodeExchangeStore({InMemoryOAuthAuthorizationCodeStore? authorizationCodeStore, InMemoryOAuthAccessTokenStore? accessTokenStore, InMemoryOAuthCodeExchangeFaultInjector? faultInjector})
Creates a process-local serialized exchange store.

Properties

accessTokenStore → InMemoryOAuthAccessTokenStore
Access-token store participating in the serialized exchange.
final
authorizationCodeStore → InMemoryOAuthAuthorizationCodeStore
Code store participating in the serialized exchange.
final
faultInjector → InMemoryOAuthCodeExchangeFaultInjector?
Optional callback for injecting rollback-test failures.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

commit({required OAuthAuthorizationCodeExchangeRequest request, required String expectedAuthorizationId, required OAuthAccessToken preparedToken}) → Future<OAuthAuthorizationCodeExchangeResult>
Atomically consumes the prepared code and saves its token.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
prepare(OAuthAuthorizationCodeExchangeRequest request) → Future<OAuthAuthorizationCodePreparation>
Checks a code without consuming a correctly bound record.
override
toString() → String
A string representation of this object.
inherited

Operators

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