MemoryCredentialStore class
Credential store that keeps credentials in memory.
Configuration parameters
credential key 1
:- ... credential parameters for key 1
credential key 2
:- ... credential parameters for key N
- ...
See ICredentialStore See CredentialParams
Example
var config = ConfigParams.fromTuples(
'key1.user', 'jdoe',
'key1.pass', 'pass123',
'key2.user', 'bsmith',
'key2.pass', 'mypass'
);
var credentialStore = MemoryCredentialStore();
credentialStore.readCredentials(config);
var credential = await credentialStore.lookup('123', 'key1')
// Result: user=jdoe;pass=pass123
- Implemented types
Constructors
- MemoryCredentialStore([ConfigParams? config])
- Creates a new instance of the credential store.
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
-
configure(
ConfigParams config) → void - Configures component by passing configuration parameters.
-
lookup(
String? correlationId, String? key) → Future< CredentialParams?> -
Lookups credential parameters by its key.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readCredentials(
ConfigParams config) → void - Reads credentials from configuration parameters. Each section represents an individual CredentialParams
-
store(
String? correlationId, String key, CredentialParams? credential) → Future -
Stores credential parameters into the store.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited