JSON Web Key
Install via npm
$ npm install --save json-web-keyUsage
var JSONWebKey = // Constructing a JWK from PEM datavar webKey = JSONWebKey// Constructing a JWK from JSON datavar webKey = JSONWebKey// Formatting as JSONwebKey // -> ObjectJSON // -> StringAPI Reference
Classes
JSONWebKey
Kind: global class
- JSONWebKey
- new JSONWebKey()
- .PEM :
Object - .getPEMBuffer(pem) ⇒
Buffer - .fromPEM(pem) ⇒
JSONWebKey - .fromJSON(json) ⇒
JSONWebKey
new JSONWebKey()
JSONWebKey
JSONWebKey.PEM : Object
Key structures
Kind: static property of JSONWebKey
JSONWebKey.getPEMBuffer(pem) ⇒ Buffer
Parse PEM content into a Buffer
Kind: static method of JSONWebKey
| Param | Type |
|---|---|
| pem | String | Buffer |
JSONWebKey.fromPEM(pem) ⇒ JSONWebKey
Create a JSON Web Key from PEM data
Kind: static method of JSONWebKey
| Param | Type |
|---|---|
| pem | String | Buffer |
JSONWebKey.fromJSON(json) ⇒ JSONWebKey
Create a JSON Web Key from JSON data
Kind: static method of JSONWebKey
| Param | Type |
|---|---|
| json | Object | String |