1 | import { ConfigParams } from 'pip-services3-commons-node';
|
2 | import { IReconfigurable } from 'pip-services3-commons-node';
|
3 | import { CredentialParams } from './CredentialParams';
|
4 | import { ICredentialStore } from './ICredentialStore';
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 | export declare class MemoryCredentialStore implements ICredentialStore, IReconfigurable {
|
36 | private _items;
|
37 | |
38 |
|
39 |
|
40 |
|
41 |
|
42 | constructor(config?: ConfigParams);
|
43 | /**
|
44 | * Configures component by passing configuration parameters.
|
45 | *
|
46 | * @param config configuration parameters to be set.
|
47 | */
|
48 | configure(config: ConfigParams): void;
|
49 | /**
|
50 | * Reads credentials from configuration parameters.
|
51 | * Each section represents an individual CredentialParams
|
52 | *
|
53 | * @param config configuration parameters to be read
|
54 | */
|
55 | readCredentials(config: ConfigParams): void;
|
56 | /**
|
57 | * Stores credential parameters into the store.
|
58 | *
|
59 | * @param correlationId (optional) transaction id to trace execution through call chain.
|
60 | * @param key a key to uniquely identify the credential parameters.
|
61 | * @param credential a credential parameters to be stored.
|
62 | * @param callback callback function that receives an error or null for success.
|
63 | */
|
64 | store(correlationId: string, key: string, credential: CredentialParams, callback: (err: any) => void): void;
|
65 | /**
|
66 | * Lookups credential parameters by its key.
|
67 | *
|
68 | * @param correlationId (optional) transaction id to trace execution through call chain.
|
69 | * @param key a key to uniquely identify the credential parameters.
|
70 | * @param callback callback function that receives found credential parameters or error.
|
71 | */
|
72 | lookup(correlationId: string, key: string, callback: (err: any, result: CredentialParams) => void): void;
|
73 | }
|