OidcDefaultStore class

The default OidcStore implementation for package:oidc this relies on:

The non-secure shared_preferences persistence uses the modern SharedPreferencesAsync API by default (see #301). You can inject your own instance via the sharedPreferencesAsync constructor parameter to share it with the rest of your app. The legacy synchronous SharedPreferences path is still supported through the deprecated sharedPreferences parameter for backward compatibility. On the default path, this store performs a one-time, best-effort migration of its own keys from the legacy store into SharedPreferencesAsync (see OidcDefaultStore.new).

Constructors

OidcDefaultStore({FlutterSecureStorage? secureStorageInstance, @Deprecated('The synchronous SharedPreferences API is now legacy. Pass ' '`sharedPreferencesAsync` (a SharedPreferencesAsync instance) instead. ' 'See https://pub.dev/packages/shared_preferences and issue #301.') SharedPreferences? sharedPreferences, SharedPreferencesAsync? sharedPreferencesAsync, String? storagePrefix = 'oidc', OidcDefaultStoreWebSessionManagementLocation webSessionManagementLocation = OidcDefaultStoreWebSessionManagementLocation.sessionStorage})
The default OidcStore implementation for package:oidc this relies on:

Properties

didInit bool
true if init has been called with no exceptions.
no setter
hashCode int
The hash code for this object.
no setterinherited
initMemoizer ↔ AsyncMemoizer<void>
Memoizer for the initialization process.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secureStorage ↔ FlutterSecureStorage?
instance of FlutterSecureStorage to use for the OidcStoreNamespace.secureTokens namespace.
getter/setter pair
storagePrefix String?
prefix to put before the keys.
final
testIsWeb bool
checks if the current platform is web.
getter/setter pair
webSessionManagementLocation OidcDefaultStoreWebSessionManagementLocation
if true, we use the sessionStorage on web for the OidcStoreNamespace.session namespace.
final

Methods

getAllKeys(OidcStoreNamespace namespace, {String? managerId}) Future<Set<String>>
getMany(OidcStoreNamespace namespace, {required Set<String> keys, String? managerId}) Future<Map<String, String>>
init() Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeMany(OidcStoreNamespace namespace, {required Set<String> keys, String? managerId}) Future<void>
setMany(OidcStoreNamespace namespace, {required Map<String, String> values, String? managerId}) Future<void>
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

createHardenedSecureStorage() → FlutterSecureStorage
Builds a FlutterSecureStorage configured with the hardened OIDC defaults (recommendedAndroidOptions, recommendedIOSOptions and recommendedMacOsOptions).

Constants

recommendedAndroidOptions → const AndroidOptions
Recommended hardened AndroidOptions for storing OIDC tokens at rest.
recommendedIOSOptions → const IOSOptions
Recommended hardened IOSOptions for storing OIDC tokens at rest.
recommendedMacOsOptions → const MacOsOptions
Recommended hardened MacOsOptions for storing OIDC tokens at rest.