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 = null ])
- Creates a new instance of the credential store. [...]
Properties
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
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
-
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
inherited