node-jws-file-provider
Version:
File Provider for node-jws handling signatures/verification using file-based keys
24 lines (17 loc) • 684 B
Markdown
File Provider for node-jws handling signatures/verification using file-based keys.
This is a Provider indended for use with `node-jws` library - allowing for signing and verification of JWS tokens using keys stored in file system.
First, install the base library with:
```bash
npm install node-jws-file-provider
```
Use by calling the provider with two arguments: paths to a private and public keys (in PEM format):
```typescript
import JWS from 'node-jws';
import FileProvider from 'node-jws-file-provider';
const provider = new FileProvider('./private.pem', './public.pem');
const jws = new JWS(provider);
```