4.0.3 • Published 23 days ago
@neoskop/ethereal-secrets-client v4.0.3
Ethereal Secrets Client
Usage
To add the library to your project:
$ npm i --save @neoskop/ethereal-secrets-client
Local Mode
to store a value bar
under the key foo
encrypted in the session storage:
const client = new EtherealSecretsClient({
endpoint: 'http://localhost:8080/secrets',
});
await client.saveLocal('foo', 'bar');
await client.getLocal('foo'); // => bar
await client.removeLocal('foo');
Remote Mode
To store a value bar
encrypted on the server:
const client = new EtherealSecretsClient({
endpoint: 'http://localhost:8080/secrets',
});
const result = await client.saveRemote('foo', 'bar');
await client.getRemote(result.fragmentIdentifier); // => bar
await client.removeRemote(result.fragmentIdentifier);
To use a second factor:
const client = new EtherealSecretsClient({
endpoint: 'http://localhost:8080/secrets',
});
const result = await client.saveRemote('foo', 'bar', { secondFactor: 'baz' });
await client.getRemote(result.fragmentIdentifier, { secondFactor: 'baz' }); // => bar
await client.removeRemote(result.fragmentIdentifier, { secondFactor: 'baz' });
Test suite
To run integration tests in this repository:
$ docker-compose -f docker-compose.test.yml up --abort-on-container-exit --build
4.0.1
23 days ago
4.0.3
23 days ago
4.0.2
23 days ago
4.0.0
8 months ago
3.0.3
1 year ago
3.1.1
1 year ago
3.0.2
1 year ago
3.1.0
1 year ago
3.0.0
2 years ago
2.0.2
2 years ago
2.0.1
2 years ago
1.4.1
2 years ago
2.0.0
2 years ago
1.4.0
3 years ago
1.3.1
4 years ago
1.3.0
4 years ago
1.2.3
4 years ago
1.2.0
5 years ago
1.1.1
5 years ago
1.1.0
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago
0.1.1
7 years ago
0.1.0
7 years ago
0.0.6
7 years ago
0.0.5
7 years ago
0.0.4
7 years ago
0.0.3
7 years ago
0.0.2
7 years ago
0.0.1
7 years ago