Constructor
new DPoPKey(alg, privateKey, publicJwk, thumbprint)
Use DPoPKey.create() or DPoPKey.loadOrCreate() rather than this.
Parameters:
| Name | Type | Description |
|---|---|---|
alg |
string | |
privateKey |
CryptoKey | |
publicJwk |
Record.<string, string> | |
thumbprint |
string |
Classes
Members
alg :string
Type:
- string
publicJwk :Record.<string, any>
Type:
- Record.<string, any>
thumbprint
RFC 7638 SHA-256 thumbprint of the public key (the jkt). @type {string}
Methods
(async) proof(opts)
Creates a DPoP proof JWT (RFC 9449 ยง4.2).
Parameters:
| Name | Type | Description |
|---|---|---|
opts |
Object | (TypeScript: |
(async, static) create(optsopt)
Builds a key from a CryptoKeyPair, generating a new pair if none is given.
Generated keys are non-extractable unless extractable is set, which sessionStorage requires.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
opts |
Object |
<optional> |
(TypeScript: |
(async, static) loadOrCreate(store, optsopt)
Loads the key held in store, or creates one and stores it.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
store |
Object | ||
opts |
Object |
<optional> |
(TypeScript: |