mirror of
https://github.com/hanzoai/jose.git
synced 2026-09-24 17:00:01 +00:00
chore: bump typedoc and typescript
This commit is contained in:
@@ -2,12 +2,10 @@
|
||||
|
||||
Decrypting JSON Web Encryption (JWE) in Compact Serialization
|
||||
|
||||
## Index
|
||||
|
||||
### Interfaces
|
||||
## Interfaces
|
||||
|
||||
- [CompactDecryptGetKey](interfaces/CompactDecryptGetKey.md)
|
||||
|
||||
### Functions
|
||||
## Functions
|
||||
|
||||
- [compactDecrypt](functions/compactDecrypt.md)
|
||||
|
||||
@@ -6,7 +6,7 @@ Support from the community to continue maintaining and improving this module is
|
||||
|
||||
## Call Signature
|
||||
|
||||
▸ **compactDecrypt**(`jwe`, `key`, `options`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`CompactDecryptResult`](../../../../types/interfaces/CompactDecryptResult.md)\>
|
||||
▸ **compactDecrypt**(`jwe`, `key`, `options?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`CompactDecryptResult`](../../../../types/interfaces/CompactDecryptResult.md)\>
|
||||
|
||||
Decrypts a Compact JWE.
|
||||
|
||||
@@ -19,7 +19,7 @@ as from its subpath export `'jose/jwe/compact/decrypt'`.
|
||||
| ------ | ------ | ------ |
|
||||
| `jwe` | `string` \| [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) | Compact JWE. |
|
||||
| `key` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md) | Private Key or Secret to decrypt the JWE with. See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210#jwe-alg). |
|
||||
| `options`? | [`DecryptOptions`](../../../../types/interfaces/DecryptOptions.md) | JWE Decryption options. |
|
||||
| `options?` | [`DecryptOptions`](../../../../types/interfaces/DecryptOptions.md) | JWE Decryption options. |
|
||||
|
||||
### Returns
|
||||
|
||||
@@ -39,7 +39,7 @@ console.log(new TextDecoder().decode(plaintext))
|
||||
|
||||
## Call Signature
|
||||
|
||||
▸ **compactDecrypt**(`jwe`, `getKey`, `options`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`CompactDecryptResult`](../../../../types/interfaces/CompactDecryptResult.md) & [`ResolvedKey`](../../../../types/interfaces/ResolvedKey.md)\>
|
||||
▸ **compactDecrypt**(`jwe`, `getKey`, `options?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`CompactDecryptResult`](../../../../types/interfaces/CompactDecryptResult.md) & [`ResolvedKey`](../../../../types/interfaces/ResolvedKey.md)\>
|
||||
|
||||
### Parameters
|
||||
|
||||
@@ -47,7 +47,7 @@ console.log(new TextDecoder().decode(plaintext))
|
||||
| ------ | ------ | ------ |
|
||||
| `jwe` | `string` \| [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) | Compact JWE. |
|
||||
| `getKey` | [`CompactDecryptGetKey`](../interfaces/CompactDecryptGetKey.md) | Function resolving Private Key or Secret to decrypt the JWE with. See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210#jwe-alg). |
|
||||
| `options`? | [`DecryptOptions`](../../../../types/interfaces/DecryptOptions.md) | JWE Decryption options. |
|
||||
| `options?` | [`DecryptOptions`](../../../../types/interfaces/DecryptOptions.md) | JWE Decryption options. |
|
||||
|
||||
### Returns
|
||||
|
||||
|
||||
@@ -9,8 +9,10 @@ verified at the time of this function call.
|
||||
|
||||
▸ **CompactDecryptGetKey**(`protectedHeader`, `token`): [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md) \| [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md)\>
|
||||
|
||||
Interface for Compact JWE Decryption dynamic key resolution. No token components have been
|
||||
verified at the time of this function call.
|
||||
Dynamic key resolution function. No token components have been verified at the time of this
|
||||
function call.
|
||||
|
||||
If a suitable key for the token cannot be matched, throw an error instead.
|
||||
|
||||
## Parameters
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
Encrypting JSON Web Encryption (JWE) in Compact Serialization
|
||||
|
||||
## Index
|
||||
|
||||
### Classes
|
||||
## Classes
|
||||
|
||||
- [CompactEncrypt](classes/CompactEncrypt.md)
|
||||
|
||||
@@ -23,11 +23,11 @@ console.log(jwe)
|
||||
|
||||
## Constructors
|
||||
|
||||
### new CompactEncrypt()
|
||||
### Constructor
|
||||
|
||||
▸ **new CompactEncrypt**(`plaintext`): [`CompactEncrypt`](CompactEncrypt.md)
|
||||
▸ **new CompactEncrypt**(`plaintext`): `CompactEncrypt`
|
||||
|
||||
[CompactEncrypt](CompactEncrypt.md) constructor
|
||||
CompactEncrypt constructor
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -37,13 +37,13 @@ console.log(jwe)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`CompactEncrypt`](CompactEncrypt.md)
|
||||
`CompactEncrypt`
|
||||
|
||||
## Methods
|
||||
|
||||
### encrypt()
|
||||
|
||||
▸ **encrypt**(`key`, `options`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
|
||||
▸ **encrypt**(`key`, `options?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
|
||||
|
||||
Encrypts and resolves the value of the Compact JWE string.
|
||||
|
||||
@@ -52,7 +52,7 @@ Encrypts and resolves the value of the Compact JWE string.
|
||||
| Parameter | Type | Description |
|
||||
| ------ | ------ | ------ |
|
||||
| `key` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md) | Public Key or Secret to encrypt the JWE with. See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210#jwe-alg). |
|
||||
| `options`? | [`EncryptOptions`](../../../../types/interfaces/EncryptOptions.md) | JWE Encryption options. |
|
||||
| `options?` | [`EncryptOptions`](../../../../types/interfaces/EncryptOptions.md) | JWE Encryption options. |
|
||||
|
||||
#### Returns
|
||||
|
||||
|
||||
@@ -2,12 +2,10 @@
|
||||
|
||||
Decrypting JSON Web Encryption (JWE) in Flattened JSON Serialization
|
||||
|
||||
## Index
|
||||
|
||||
### Interfaces
|
||||
## Interfaces
|
||||
|
||||
- [FlattenedDecryptGetKey](interfaces/FlattenedDecryptGetKey.md)
|
||||
|
||||
### Functions
|
||||
## Functions
|
||||
|
||||
- [flattenedDecrypt](functions/flattenedDecrypt.md)
|
||||
|
||||
@@ -6,7 +6,7 @@ Support from the community to continue maintaining and improving this module is
|
||||
|
||||
## Call Signature
|
||||
|
||||
▸ **flattenedDecrypt**(`jwe`, `key`, `options`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`FlattenedDecryptResult`](../../../../types/interfaces/FlattenedDecryptResult.md)\>
|
||||
▸ **flattenedDecrypt**(`jwe`, `key`, `options?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`FlattenedDecryptResult`](../../../../types/interfaces/FlattenedDecryptResult.md)\>
|
||||
|
||||
Decrypts a Flattened JWE.
|
||||
|
||||
@@ -19,7 +19,7 @@ as from its subpath export `'jose/jwe/flattened/decrypt'`.
|
||||
| ------ | ------ | ------ |
|
||||
| `jwe` | [`FlattenedJWE`](../../../../types/interfaces/FlattenedJWE.md) | Flattened JWE. |
|
||||
| `key` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md) | Private Key or Secret to decrypt the JWE with. See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210#jwe-alg). |
|
||||
| `options`? | [`DecryptOptions`](../../../../types/interfaces/DecryptOptions.md) | JWE Decryption options. |
|
||||
| `options?` | [`DecryptOptions`](../../../../types/interfaces/DecryptOptions.md) | JWE Decryption options. |
|
||||
|
||||
### Returns
|
||||
|
||||
@@ -49,7 +49,7 @@ console.log(decoder.decode(additionalAuthenticatedData))
|
||||
|
||||
## Call Signature
|
||||
|
||||
▸ **flattenedDecrypt**(`jwe`, `getKey`, `options`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`FlattenedDecryptResult`](../../../../types/interfaces/FlattenedDecryptResult.md) & [`ResolvedKey`](../../../../types/interfaces/ResolvedKey.md)\>
|
||||
▸ **flattenedDecrypt**(`jwe`, `getKey`, `options?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`FlattenedDecryptResult`](../../../../types/interfaces/FlattenedDecryptResult.md) & [`ResolvedKey`](../../../../types/interfaces/ResolvedKey.md)\>
|
||||
|
||||
### Parameters
|
||||
|
||||
@@ -57,7 +57,7 @@ console.log(decoder.decode(additionalAuthenticatedData))
|
||||
| ------ | ------ | ------ |
|
||||
| `jwe` | [`FlattenedJWE`](../../../../types/interfaces/FlattenedJWE.md) | Flattened JWE. |
|
||||
| `getKey` | [`FlattenedDecryptGetKey`](../interfaces/FlattenedDecryptGetKey.md) | Function resolving Private Key or Secret to decrypt the JWE with. See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210#jwe-alg). |
|
||||
| `options`? | [`DecryptOptions`](../../../../types/interfaces/DecryptOptions.md) | JWE Decryption options. |
|
||||
| `options?` | [`DecryptOptions`](../../../../types/interfaces/DecryptOptions.md) | JWE Decryption options. |
|
||||
|
||||
### Returns
|
||||
|
||||
|
||||
@@ -9,8 +9,10 @@ verified at the time of this function call.
|
||||
|
||||
▸ **FlattenedDecryptGetKey**(`protectedHeader`, `token`): [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md) \| [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md)\>
|
||||
|
||||
Interface for Flattened JWE Decryption dynamic key resolution. No token components have been
|
||||
verified at the time of this function call.
|
||||
Dynamic key resolution function. No token components have been verified at the time of this
|
||||
function call.
|
||||
|
||||
If a suitable key for the token cannot be matched, throw an error instead.
|
||||
|
||||
## Parameters
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
Encrypting JSON Web Encryption (JWE) in Flattened JSON Serialization
|
||||
|
||||
## Index
|
||||
|
||||
### Classes
|
||||
## Classes
|
||||
|
||||
- [FlattenedEncrypt](classes/FlattenedEncrypt.md)
|
||||
|
||||
@@ -24,11 +24,11 @@ console.log(jwe)
|
||||
|
||||
## Constructors
|
||||
|
||||
### new FlattenedEncrypt()
|
||||
### Constructor
|
||||
|
||||
▸ **new FlattenedEncrypt**(`plaintext`): [`FlattenedEncrypt`](FlattenedEncrypt.md)
|
||||
▸ **new FlattenedEncrypt**(`plaintext`): `FlattenedEncrypt`
|
||||
|
||||
[FlattenedEncrypt](FlattenedEncrypt.md) constructor
|
||||
FlattenedEncrypt constructor
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -38,13 +38,13 @@ console.log(jwe)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`FlattenedEncrypt`](FlattenedEncrypt.md)
|
||||
`FlattenedEncrypt`
|
||||
|
||||
## Methods
|
||||
|
||||
### encrypt()
|
||||
|
||||
▸ **encrypt**(`key`, `options`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`FlattenedJWE`](../../../../types/interfaces/FlattenedJWE.md)\>
|
||||
▸ **encrypt**(`key`, `options?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`FlattenedJWE`](../../../../types/interfaces/FlattenedJWE.md)\>
|
||||
|
||||
Encrypts and resolves the value of the Flattened JWE object.
|
||||
|
||||
@@ -53,7 +53,7 @@ Encrypts and resolves the value of the Flattened JWE object.
|
||||
| Parameter | Type | Description |
|
||||
| ------ | ------ | ------ |
|
||||
| `key` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md) | Public Key or Secret to encrypt the JWE with. See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210#jwe-alg). |
|
||||
| `options`? | [`EncryptOptions`](../../../../types/interfaces/EncryptOptions.md) | JWE Encryption options. |
|
||||
| `options?` | [`EncryptOptions`](../../../../types/interfaces/EncryptOptions.md) | JWE Encryption options. |
|
||||
|
||||
#### Returns
|
||||
|
||||
|
||||
@@ -2,12 +2,10 @@
|
||||
|
||||
Decrypting JSON Web Encryption (JWE) in General JSON Serialization
|
||||
|
||||
## Index
|
||||
|
||||
### Interfaces
|
||||
## Interfaces
|
||||
|
||||
- [GeneralDecryptGetKey](interfaces/GeneralDecryptGetKey.md)
|
||||
|
||||
### Functions
|
||||
## Functions
|
||||
|
||||
- [generalDecrypt](functions/generalDecrypt.md)
|
||||
|
||||
@@ -6,7 +6,7 @@ Support from the community to continue maintaining and improving this module is
|
||||
|
||||
## Call Signature
|
||||
|
||||
▸ **generalDecrypt**(`jwe`, `key`, `options`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`GeneralDecryptResult`](../../../../types/interfaces/GeneralDecryptResult.md)\>
|
||||
▸ **generalDecrypt**(`jwe`, `key`, `options?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`GeneralDecryptResult`](../../../../types/interfaces/GeneralDecryptResult.md)\>
|
||||
|
||||
Decrypts a General JWE.
|
||||
|
||||
@@ -19,7 +19,7 @@ as from its subpath export `'jose/jwe/general/decrypt'`.
|
||||
| ------ | ------ | ------ |
|
||||
| `jwe` | [`GeneralJWE`](../../../../types/interfaces/GeneralJWE.md) | General JWE. |
|
||||
| `key` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md) | Private Key or Secret to decrypt the JWE with. See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210#jwe-alg). |
|
||||
| `options`? | [`DecryptOptions`](../../../../types/interfaces/DecryptOptions.md) | JWE Decryption options. |
|
||||
| `options?` | [`DecryptOptions`](../../../../types/interfaces/DecryptOptions.md) | JWE Decryption options. |
|
||||
|
||||
### Returns
|
||||
|
||||
@@ -53,7 +53,7 @@ console.log(decoder.decode(additionalAuthenticatedData))
|
||||
|
||||
## Call Signature
|
||||
|
||||
▸ **generalDecrypt**(`jwe`, `getKey`, `options`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`GeneralDecryptResult`](../../../../types/interfaces/GeneralDecryptResult.md) & [`ResolvedKey`](../../../../types/interfaces/ResolvedKey.md)\>
|
||||
▸ **generalDecrypt**(`jwe`, `getKey`, `options?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`GeneralDecryptResult`](../../../../types/interfaces/GeneralDecryptResult.md) & [`ResolvedKey`](../../../../types/interfaces/ResolvedKey.md)\>
|
||||
|
||||
### Parameters
|
||||
|
||||
@@ -61,7 +61,7 @@ console.log(decoder.decode(additionalAuthenticatedData))
|
||||
| ------ | ------ | ------ |
|
||||
| `jwe` | [`GeneralJWE`](../../../../types/interfaces/GeneralJWE.md) | General JWE. |
|
||||
| `getKey` | [`GeneralDecryptGetKey`](../interfaces/GeneralDecryptGetKey.md) | Function resolving Private Key or Secret to decrypt the JWE with. See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210#jwe-alg). |
|
||||
| `options`? | [`DecryptOptions`](../../../../types/interfaces/DecryptOptions.md) | JWE Decryption options. |
|
||||
| `options?` | [`DecryptOptions`](../../../../types/interfaces/DecryptOptions.md) | JWE Decryption options. |
|
||||
|
||||
### Returns
|
||||
|
||||
|
||||
@@ -9,8 +9,10 @@ verified at the time of this function call.
|
||||
|
||||
▸ **GeneralDecryptGetKey**(`protectedHeader`, `token`): [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md) \| [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md)\>
|
||||
|
||||
Interface for General JWE Decryption dynamic key resolution. No token components have been
|
||||
verified at the time of this function call.
|
||||
Dynamic key resolution function. No token components have been verified at the time of this
|
||||
function call.
|
||||
|
||||
If a suitable key for the token cannot be matched, throw an error instead.
|
||||
|
||||
## Parameters
|
||||
|
||||
|
||||
@@ -2,12 +2,10 @@
|
||||
|
||||
Encrypting JSON Web Encryption (JWE) in General JSON Serialization
|
||||
|
||||
## Index
|
||||
|
||||
### Classes
|
||||
## Classes
|
||||
|
||||
- [GeneralEncrypt](classes/GeneralEncrypt.md)
|
||||
|
||||
### Interfaces
|
||||
## Interfaces
|
||||
|
||||
- [Recipient](interfaces/Recipient.md)
|
||||
|
||||
@@ -27,11 +27,11 @@ console.log(jwe)
|
||||
|
||||
## Constructors
|
||||
|
||||
### new GeneralEncrypt()
|
||||
### Constructor
|
||||
|
||||
▸ **new GeneralEncrypt**(`plaintext`): [`GeneralEncrypt`](GeneralEncrypt.md)
|
||||
▸ **new GeneralEncrypt**(`plaintext`): `GeneralEncrypt`
|
||||
|
||||
[GeneralEncrypt](GeneralEncrypt.md) constructor
|
||||
GeneralEncrypt constructor
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -41,13 +41,13 @@ console.log(jwe)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`GeneralEncrypt`](GeneralEncrypt.md)
|
||||
`GeneralEncrypt`
|
||||
|
||||
## Methods
|
||||
|
||||
### addRecipient()
|
||||
|
||||
▸ **addRecipient**(`key`, `options`?): [`Recipient`](../interfaces/Recipient.md)
|
||||
▸ **addRecipient**(`key`, `options?`): [`Recipient`](../interfaces/Recipient.md)
|
||||
|
||||
Adds an additional recipient for the General JWE object.
|
||||
|
||||
@@ -56,7 +56,7 @@ Adds an additional recipient for the General JWE object.
|
||||
| Parameter | Type | Description |
|
||||
| ------ | ------ | ------ |
|
||||
| `key` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md) | Public Key or Secret to encrypt the Content Encryption Key for the recipient with. See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210#jwe-alg). |
|
||||
| `options`? | [`CritOption`](../../../../types/interfaces/CritOption.md) | JWE Encryption options. |
|
||||
| `options?` | [`CritOption`](../../../../types/interfaces/CritOption.md) | JWE Encryption options. |
|
||||
|
||||
#### Returns
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ Used to build General JWE object's individual recipients.
|
||||
|
||||
### addRecipient()
|
||||
|
||||
▸ **addRecipient**(...`args`): [`Recipient`](Recipient.md)
|
||||
▸ **addRecipient**(...`args`): `Recipient`
|
||||
|
||||
A shorthand for calling addRecipient() on the enclosing [GeneralEncrypt](../classes/GeneralEncrypt.md) instance
|
||||
|
||||
@@ -18,11 +18,11 @@ A shorthand for calling addRecipient() on the enclosing [GeneralEncrypt](../clas
|
||||
|
||||
| Parameter | Type |
|
||||
| ------ | ------ |
|
||||
| ...`args` | [[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md), [`CritOption`](../../../../types/interfaces/CritOption.md)] |
|
||||
| ...`args` | \[[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md), [`CritOption`](../../../../types/interfaces/CritOption.md)\] |
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Recipient`](Recipient.md)
|
||||
`Recipient`
|
||||
|
||||
***
|
||||
|
||||
@@ -48,7 +48,7 @@ A shorthand for calling encrypt() on the enclosing [GeneralEncrypt](../classes/G
|
||||
|
||||
| Parameter | Type |
|
||||
| ------ | ------ |
|
||||
| ...`args` | [] |
|
||||
| ...`args` | \[\] |
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -58,7 +58,7 @@ A shorthand for calling encrypt() on the enclosing [GeneralEncrypt](../classes/G
|
||||
|
||||
### setUnprotectedHeader()
|
||||
|
||||
▸ **setUnprotectedHeader**(`unprotectedHeader`): [`Recipient`](Recipient.md)
|
||||
▸ **setUnprotectedHeader**(`unprotectedHeader`): `Recipient`
|
||||
|
||||
Sets the JWE Per-Recipient Unprotected Header on the Recipient object.
|
||||
|
||||
@@ -70,4 +70,4 @@ Sets the JWE Per-Recipient Unprotected Header on the Recipient object.
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Recipient`](Recipient.md)
|
||||
`Recipient`
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
Verification using a JWK Embedded in a JWS Header
|
||||
|
||||
## Index
|
||||
|
||||
### Functions
|
||||
## Functions
|
||||
|
||||
- [EmbeddedJWK](functions/EmbeddedJWK.md)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by [becoming a sponsor](https://github.com/sponsors/panva).
|
||||
|
||||
▸ **EmbeddedJWK**(`protectedHeader`?, `token`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey)\>
|
||||
▸ **EmbeddedJWK**(`protectedHeader?`, `token?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey)\>
|
||||
|
||||
EmbeddedJWK is an implementation of a GetKeyFunction intended to be used with the JWS/JWT verify
|
||||
operations whenever you need to opt-in to verify signatures with a public key embedded in the
|
||||
@@ -18,8 +18,8 @@ as from its subpath export `'jose/jwk/embedded'`.
|
||||
|
||||
| Parameter | Type |
|
||||
| ------ | ------ |
|
||||
| `protectedHeader`? | [`JWSHeaderParameters`](../../../types/interfaces/JWSHeaderParameters.md) |
|
||||
| `token`? | [`FlattenedJWSInput`](../../../types/interfaces/FlattenedJWSInput.md) |
|
||||
| `protectedHeader?` | [`JWSHeaderParameters`](../../../types/interfaces/JWSHeaderParameters.md) |
|
||||
| `token?` | [`FlattenedJWSInput`](../../../types/interfaces/FlattenedJWSInput.md) |
|
||||
|
||||
## Returns
|
||||
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
|
||||
JSON Web Key Thumbprint and JSON Web Key Thumbprint URI
|
||||
|
||||
## Index
|
||||
|
||||
### Functions
|
||||
## Functions
|
||||
|
||||
- [calculateJwkThumbprint](functions/calculateJwkThumbprint.md)
|
||||
- [calculateJwkThumbprintUri](functions/calculateJwkThumbprintUri.md)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by [becoming a sponsor](https://github.com/sponsors/panva).
|
||||
|
||||
▸ **calculateJwkThumbprint**(`key`, `digestAlgorithm`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
|
||||
▸ **calculateJwkThumbprint**(`key`, `digestAlgorithm?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
|
||||
|
||||
Calculates a base64url-encoded JSON Web Key (JWK) Thumbprint
|
||||
|
||||
@@ -16,7 +16,7 @@ as from its subpath export `'jose/jwk/thumbprint'`.
|
||||
| Parameter | Type | Description |
|
||||
| ------ | ------ | ------ |
|
||||
| `key` | [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../types/interfaces/KeyObject.md) | Key to calculate the thumbprint for. |
|
||||
| `digestAlgorithm`? | `"sha256"` \| `"sha384"` \| `"sha512"` | Digest Algorithm to use for calculating the thumbprint. Default is "sha256". |
|
||||
| `digestAlgorithm?` | `"sha256"` \| `"sha384"` \| `"sha512"` | Digest Algorithm to use for calculating the thumbprint. Default is "sha256". |
|
||||
|
||||
## Returns
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by [becoming a sponsor](https://github.com/sponsors/panva).
|
||||
|
||||
▸ **calculateJwkThumbprintUri**(`key`, `digestAlgorithm`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
|
||||
▸ **calculateJwkThumbprintUri**(`key`, `digestAlgorithm?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
|
||||
|
||||
Calculates a JSON Web Key (JWK) Thumbprint URI
|
||||
|
||||
@@ -16,7 +16,7 @@ as from its subpath export `'jose/jwk/thumbprint'`.
|
||||
| Parameter | Type | Description |
|
||||
| ------ | ------ | ------ |
|
||||
| `key` | [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../types/interfaces/KeyObject.md) | Key to calculate the thumbprint for. |
|
||||
| `digestAlgorithm`? | `"sha256"` \| `"sha384"` \| `"sha512"` | Digest Algorithm to use for calculating the thumbprint. Default is "sha256". |
|
||||
| `digestAlgorithm?` | `"sha256"` \| `"sha384"` \| `"sha512"` | Digest Algorithm to use for calculating the thumbprint. Default is "sha256". |
|
||||
|
||||
## Returns
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
Verification using a JSON Web Key Set (JWKS) available locally
|
||||
|
||||
## Index
|
||||
|
||||
### Functions
|
||||
## Functions
|
||||
|
||||
- [createLocalJWKSet](functions/createLocalJWKSet.md)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by [becoming a sponsor](https://github.com/sponsors/panva).
|
||||
|
||||
▸ **createLocalJWKSet**(`jwks`): (`protectedHeader`?, `token`?) => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey)\>
|
||||
▸ **createLocalJWKSet**(`jwks`): (`protectedHeader?`, `token?`) => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey)\>
|
||||
|
||||
Returns a function that resolves a JWS JOSE Header to a public key object from a locally stored,
|
||||
or otherwise available, JSON Web Key Set.
|
||||
@@ -33,14 +33,14 @@ as from its subpath export `'jose/jwks/local'`.
|
||||
|
||||
## Returns
|
||||
|
||||
`Function`
|
||||
▸ (`protectedHeader?`, `token?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey)\>
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type |
|
||||
| ------ | ------ |
|
||||
| `protectedHeader`? | [`JWSHeaderParameters`](../../../types/interfaces/JWSHeaderParameters.md) |
|
||||
| `token`? | [`FlattenedJWSInput`](../../../types/interfaces/FlattenedJWSInput.md) |
|
||||
| `protectedHeader?` | [`JWSHeaderParameters`](../../../types/interfaces/JWSHeaderParameters.md) |
|
||||
| `token?` | [`FlattenedJWSInput`](../../../types/interfaces/FlattenedJWSInput.md) |
|
||||
|
||||
### Returns
|
||||
|
||||
|
||||
@@ -2,23 +2,21 @@
|
||||
|
||||
Verification using a JSON Web Key Set (JWKS) available on an HTTP(S) URL
|
||||
|
||||
## Index
|
||||
|
||||
### Functions
|
||||
|
||||
- [createRemoteJWKSet](functions/createRemoteJWKSet.md)
|
||||
|
||||
### Interfaces
|
||||
## Interfaces
|
||||
|
||||
- [ExportedJWKSCache](interfaces/ExportedJWKSCache.md)
|
||||
- [RemoteJWKSetOptions](interfaces/RemoteJWKSetOptions.md)
|
||||
|
||||
### Type Aliases
|
||||
## Type Aliases
|
||||
|
||||
- [FetchImplementation](type-aliases/FetchImplementation.md)
|
||||
- [JWKSCacheInput](type-aliases/JWKSCacheInput.md)
|
||||
|
||||
### Variables
|
||||
## Variables
|
||||
|
||||
- [customFetch](variables/customFetch.md)
|
||||
- [jwksCache](variables/jwksCache.md)
|
||||
|
||||
## Functions
|
||||
|
||||
- [createRemoteJWKSet](functions/createRemoteJWKSet.md)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by [becoming a sponsor](https://github.com/sponsors/panva).
|
||||
|
||||
▸ **createRemoteJWKSet**(`url`, `options`?): (`protectedHeader`?, `token`?) => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey)\>
|
||||
▸ **createRemoteJWKSet**(`url`, `options?`): (`protectedHeader?`, `token?`) => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey)\>
|
||||
|
||||
Returns a function that resolves a JWS JOSE Header to a public key object downloaded from a
|
||||
remote endpoint returning a JSON Web Key Set, that is, for example, an OAuth 2.0 or OIDC
|
||||
@@ -32,18 +32,18 @@ as from its subpath export `'jose/jwks/remote'`.
|
||||
| Parameter | Type | Description |
|
||||
| ------ | ------ | ------ |
|
||||
| `url` | [`URL`](https://developer.mozilla.org/docs/Web/API/URL) | URL to fetch the JSON Web Key Set from. |
|
||||
| `options`? | [`RemoteJWKSetOptions`](../interfaces/RemoteJWKSetOptions.md) | Options for the remote JSON Web Key Set. |
|
||||
| `options?` | [`RemoteJWKSetOptions`](../interfaces/RemoteJWKSetOptions.md) | Options for the remote JSON Web Key Set. |
|
||||
|
||||
## Returns
|
||||
|
||||
`Function`
|
||||
▸ (`protectedHeader?`, `token?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey)\>
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type |
|
||||
| ------ | ------ |
|
||||
| `protectedHeader`? | [`JWSHeaderParameters`](../../../types/interfaces/JWSHeaderParameters.md) |
|
||||
| `token`? | [`FlattenedJWSInput`](../../../types/interfaces/FlattenedJWSInput.md) |
|
||||
| `protectedHeader?` | [`JWSHeaderParameters`](../../../types/interfaces/JWSHeaderParameters.md) |
|
||||
| `token?` | [`FlattenedJWSInput`](../../../types/interfaces/FlattenedJWSInput.md) |
|
||||
|
||||
### Returns
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by [becoming a sponsor](https://github.com/sponsors/panva).
|
||||
|
||||
• **FetchImplementation**: (`url`, `options`) => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Response`](https://developer.mozilla.org/docs/Web/API/Response)\>
|
||||
• **FetchImplementation** = (`url`, `options`) => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Response`](https://developer.mozilla.org/docs/Web/API/Response)\>
|
||||
|
||||
See [customFetch](../variables/customFetch.md).
|
||||
|
||||
@@ -13,7 +13,7 @@ See [customFetch](../variables/customFetch.md).
|
||||
| Parameter | Type | Description |
|
||||
| ------ | ------ | ------ |
|
||||
| `url` | `string` | - |
|
||||
| `options` | \{`headers`: [`Headers`](https://developer.mozilla.org/docs/Web/API/Headers);`method`: `"GET"`;`redirect`: `"manual"`;`signal`: [`AbortSignal`](https://developer.mozilla.org/docs/Web/API/AbortSignal); \} | - |
|
||||
| `options` | \{ `headers`: [`Headers`](https://developer.mozilla.org/docs/Web/API/Headers); `method`: `"GET"`; `redirect`: `"manual"`; `signal`: [`AbortSignal`](https://developer.mozilla.org/docs/Web/API/AbortSignal); \} | - |
|
||||
| `options.headers` | [`Headers`](https://developer.mozilla.org/docs/Web/API/Headers) | HTTP Headers |
|
||||
| `options.method` | `"GET"` | The [request method](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods) |
|
||||
| `options.redirect` | `"manual"` | See [Request.redirect](https://developer.mozilla.org/docs/Web/API/Request/redirect) |
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
|
||||
Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by [becoming a sponsor](https://github.com/sponsors/panva).
|
||||
|
||||
• **JWKSCacheInput**: [`ExportedJWKSCache`](../interfaces/ExportedJWKSCache.md) \| [`Record`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)\<`string`, `never`\>
|
||||
• **JWKSCacheInput** = [`ExportedJWKSCache`](../interfaces/ExportedJWKSCache.md) \| [`Record`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)\<`string`, `never`\>
|
||||
|
||||
See [jwksCache](../variables/jwksCache.md).
|
||||
|
||||
@@ -29,7 +29,7 @@ The intended use pattern is:
|
||||
previously cached object from a low-latency key-value store offered by the cloud computing
|
||||
runtime it is executed on;
|
||||
- Default to an empty object `{}` instead when there's no previously cached value;
|
||||
- Pass it in as [[jwksCache]](../interfaces/RemoteJWKSetOptions.md);
|
||||
- Pass it in as [\[jwksCache\]](../interfaces/RemoteJWKSetOptions.md);
|
||||
- Afterwards, update the key-value storage if the [`uat`](../interfaces/ExportedJWKSCache.md#uat) property of
|
||||
the object has changed.
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
Signing JSON Web Signature (JWS) in Compact Serialization
|
||||
|
||||
## Index
|
||||
|
||||
### Classes
|
||||
## Classes
|
||||
|
||||
- [CompactSign](classes/CompactSign.md)
|
||||
|
||||
@@ -23,11 +23,11 @@ console.log(jws)
|
||||
|
||||
## Constructors
|
||||
|
||||
### new CompactSign()
|
||||
### Constructor
|
||||
|
||||
▸ **new CompactSign**(`payload`): [`CompactSign`](CompactSign.md)
|
||||
▸ **new CompactSign**(`payload`): `CompactSign`
|
||||
|
||||
[CompactSign](CompactSign.md) constructor
|
||||
CompactSign constructor
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -37,7 +37,7 @@ console.log(jws)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`CompactSign`](CompactSign.md)
|
||||
`CompactSign`
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -61,7 +61,7 @@ Sets the JWS Protected Header on the CompactSign object.
|
||||
|
||||
### sign()
|
||||
|
||||
▸ **sign**(`key`, `options`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
|
||||
▸ **sign**(`key`, `options?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
|
||||
|
||||
Signs and resolves the value of the Compact JWS string.
|
||||
|
||||
@@ -70,7 +70,7 @@ Signs and resolves the value of the Compact JWS string.
|
||||
| Parameter | Type | Description |
|
||||
| ------ | ------ | ------ |
|
||||
| `key` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md) | Private Key or Secret to sign the JWS with. See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210#jws-alg). |
|
||||
| `options`? | [`SignOptions`](../../../../types/interfaces/SignOptions.md) | JWS Sign options. |
|
||||
| `options?` | [`SignOptions`](../../../../types/interfaces/SignOptions.md) | JWS Sign options. |
|
||||
|
||||
#### Returns
|
||||
|
||||
|
||||
@@ -2,12 +2,10 @@
|
||||
|
||||
Verifying JSON Web Signature (JWS) in Compact Serialization
|
||||
|
||||
## Index
|
||||
|
||||
### Interfaces
|
||||
## Interfaces
|
||||
|
||||
- [CompactVerifyGetKey](interfaces/CompactVerifyGetKey.md)
|
||||
|
||||
### Functions
|
||||
## Functions
|
||||
|
||||
- [compactVerify](functions/compactVerify.md)
|
||||
|
||||
@@ -6,7 +6,7 @@ Support from the community to continue maintaining and improving this module is
|
||||
|
||||
## Call Signature
|
||||
|
||||
▸ **compactVerify**(`jws`, `key`, `options`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`CompactVerifyResult`](../../../../types/interfaces/CompactVerifyResult.md)\>
|
||||
▸ **compactVerify**(`jws`, `key`, `options?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`CompactVerifyResult`](../../../../types/interfaces/CompactVerifyResult.md)\>
|
||||
|
||||
Verifies the signature and format of and afterwards decodes the Compact JWS.
|
||||
|
||||
@@ -19,7 +19,7 @@ as from its subpath export `'jose/jws/compact/verify'`.
|
||||
| ------ | ------ | ------ |
|
||||
| `jws` | `string` \| [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) | Compact JWS. |
|
||||
| `key` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md) | Key to verify the JWS with. See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210#jws-alg). |
|
||||
| `options`? | [`VerifyOptions`](../../../../types/interfaces/VerifyOptions.md) | JWS Verify options. |
|
||||
| `options?` | [`VerifyOptions`](../../../../types/interfaces/VerifyOptions.md) | JWS Verify options. |
|
||||
|
||||
### Returns
|
||||
|
||||
@@ -39,7 +39,7 @@ console.log(new TextDecoder().decode(payload))
|
||||
|
||||
## Call Signature
|
||||
|
||||
▸ **compactVerify**(`jws`, `getKey`, `options`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`CompactVerifyResult`](../../../../types/interfaces/CompactVerifyResult.md) & [`ResolvedKey`](../../../../types/interfaces/ResolvedKey.md)\>
|
||||
▸ **compactVerify**(`jws`, `getKey`, `options?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`CompactVerifyResult`](../../../../types/interfaces/CompactVerifyResult.md) & [`ResolvedKey`](../../../../types/interfaces/ResolvedKey.md)\>
|
||||
|
||||
### Parameters
|
||||
|
||||
@@ -47,7 +47,7 @@ console.log(new TextDecoder().decode(payload))
|
||||
| ------ | ------ | ------ |
|
||||
| `jws` | `string` \| [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) | Compact JWS. |
|
||||
| `getKey` | [`CompactVerifyGetKey`](../interfaces/CompactVerifyGetKey.md) | Function resolving a key to verify the JWS with. See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210#jws-alg). |
|
||||
| `options`? | [`VerifyOptions`](../../../../types/interfaces/VerifyOptions.md) | JWS Verify options. |
|
||||
| `options?` | [`VerifyOptions`](../../../../types/interfaces/VerifyOptions.md) | JWS Verify options. |
|
||||
|
||||
### Returns
|
||||
|
||||
|
||||
@@ -13,8 +13,10 @@ verified at the time of this function call.
|
||||
|
||||
▸ **CompactVerifyGetKey**(`protectedHeader`, `token`): [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md) \| [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md)\>
|
||||
|
||||
Interface for Compact JWS Verification dynamic key resolution. No token components have been
|
||||
verified at the time of this function call.
|
||||
Dynamic key resolution function. No token components have been verified at the time of this
|
||||
function call.
|
||||
|
||||
If a suitable key for the token cannot be matched, throw an error instead.
|
||||
|
||||
## Parameters
|
||||
|
||||
@@ -26,7 +28,3 @@ verified at the time of this function call.
|
||||
## Returns
|
||||
|
||||
[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md) \| [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md)\>
|
||||
|
||||
## See
|
||||
|
||||
[createRemoteJWKSet](../../../../jwks/remote/functions/createRemoteJWKSet.md) to verify using a remote JSON Web Key Set.
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
Signing JSON Web Signature (JWS) in Flattened JSON Serialization
|
||||
|
||||
## Index
|
||||
|
||||
### Classes
|
||||
## Classes
|
||||
|
||||
- [FlattenedSign](classes/FlattenedSign.md)
|
||||
|
||||
@@ -23,11 +23,11 @@ console.log(jws)
|
||||
|
||||
## Constructors
|
||||
|
||||
### new FlattenedSign()
|
||||
### Constructor
|
||||
|
||||
▸ **new FlattenedSign**(`payload`): [`FlattenedSign`](FlattenedSign.md)
|
||||
▸ **new FlattenedSign**(`payload`): `FlattenedSign`
|
||||
|
||||
[FlattenedSign](FlattenedSign.md) constructor
|
||||
FlattenedSign constructor
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -37,7 +37,7 @@ console.log(jws)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`FlattenedSign`](FlattenedSign.md)
|
||||
`FlattenedSign`
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -79,7 +79,7 @@ Sets the JWS Unprotected Header on the FlattenedSign object.
|
||||
|
||||
### sign()
|
||||
|
||||
▸ **sign**(`key`, `options`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`FlattenedJWS`](../../../../types/interfaces/FlattenedJWS.md)\>
|
||||
▸ **sign**(`key`, `options?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`FlattenedJWS`](../../../../types/interfaces/FlattenedJWS.md)\>
|
||||
|
||||
Signs and resolves the value of the Flattened JWS object.
|
||||
|
||||
@@ -88,7 +88,7 @@ Signs and resolves the value of the Flattened JWS object.
|
||||
| Parameter | Type | Description |
|
||||
| ------ | ------ | ------ |
|
||||
| `key` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md) | Private Key or Secret to sign the JWS with. See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210#jws-alg). |
|
||||
| `options`? | [`SignOptions`](../../../../types/interfaces/SignOptions.md) | JWS Sign options. |
|
||||
| `options?` | [`SignOptions`](../../../../types/interfaces/SignOptions.md) | JWS Sign options. |
|
||||
|
||||
#### Returns
|
||||
|
||||
|
||||
@@ -2,12 +2,10 @@
|
||||
|
||||
Verifying JSON Web Signature (JWS) in Flattened JSON Serialization
|
||||
|
||||
## Index
|
||||
|
||||
### Interfaces
|
||||
## Interfaces
|
||||
|
||||
- [FlattenedVerifyGetKey](interfaces/FlattenedVerifyGetKey.md)
|
||||
|
||||
### Functions
|
||||
## Functions
|
||||
|
||||
- [flattenedVerify](functions/flattenedVerify.md)
|
||||
|
||||
@@ -6,7 +6,7 @@ Support from the community to continue maintaining and improving this module is
|
||||
|
||||
## Call Signature
|
||||
|
||||
▸ **flattenedVerify**(`jws`, `key`, `options`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`FlattenedVerifyResult`](../../../../types/interfaces/FlattenedVerifyResult.md)\>
|
||||
▸ **flattenedVerify**(`jws`, `key`, `options?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`FlattenedVerifyResult`](../../../../types/interfaces/FlattenedVerifyResult.md)\>
|
||||
|
||||
Verifies the signature and format of and afterwards decodes the Flattened JWS.
|
||||
|
||||
@@ -19,7 +19,7 @@ as from its subpath export `'jose/jws/flattened/verify'`.
|
||||
| ------ | ------ | ------ |
|
||||
| `jws` | [`FlattenedJWSInput`](../../../../types/interfaces/FlattenedJWSInput.md) | Flattened JWS. |
|
||||
| `key` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md) | Key to verify the JWS with. See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210#jws-alg). |
|
||||
| `options`? | [`VerifyOptions`](../../../../types/interfaces/VerifyOptions.md) | JWS Verify options. |
|
||||
| `options?` | [`VerifyOptions`](../../../../types/interfaces/VerifyOptions.md) | JWS Verify options. |
|
||||
|
||||
### Returns
|
||||
|
||||
@@ -44,7 +44,7 @@ console.log(decoder.decode(payload))
|
||||
|
||||
## Call Signature
|
||||
|
||||
▸ **flattenedVerify**(`jws`, `getKey`, `options`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`FlattenedVerifyResult`](../../../../types/interfaces/FlattenedVerifyResult.md) & [`ResolvedKey`](../../../../types/interfaces/ResolvedKey.md)\>
|
||||
▸ **flattenedVerify**(`jws`, `getKey`, `options?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`FlattenedVerifyResult`](../../../../types/interfaces/FlattenedVerifyResult.md) & [`ResolvedKey`](../../../../types/interfaces/ResolvedKey.md)\>
|
||||
|
||||
### Parameters
|
||||
|
||||
@@ -52,7 +52,7 @@ console.log(decoder.decode(payload))
|
||||
| ------ | ------ | ------ |
|
||||
| `jws` | [`FlattenedJWSInput`](../../../../types/interfaces/FlattenedJWSInput.md) | Flattened JWS. |
|
||||
| `getKey` | [`FlattenedVerifyGetKey`](../interfaces/FlattenedVerifyGetKey.md) | Function resolving a key to verify the JWS with. See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210#jws-alg). |
|
||||
| `options`? | [`VerifyOptions`](../../../../types/interfaces/VerifyOptions.md) | JWS Verify options. |
|
||||
| `options?` | [`VerifyOptions`](../../../../types/interfaces/VerifyOptions.md) | JWS Verify options. |
|
||||
|
||||
### Returns
|
||||
|
||||
|
||||
@@ -13,8 +13,10 @@ verified at the time of this function call.
|
||||
|
||||
▸ **FlattenedVerifyGetKey**(`protectedHeader`, `token`): [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md) \| [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md)\>
|
||||
|
||||
Interface for Flattened JWS Verification dynamic key resolution. No token components have been
|
||||
verified at the time of this function call.
|
||||
Dynamic key resolution function. No token components have been verified at the time of this
|
||||
function call.
|
||||
|
||||
If a suitable key for the token cannot be matched, throw an error instead.
|
||||
|
||||
## Parameters
|
||||
|
||||
@@ -26,7 +28,3 @@ verified at the time of this function call.
|
||||
## Returns
|
||||
|
||||
[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md) \| [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md)\>
|
||||
|
||||
## See
|
||||
|
||||
[createRemoteJWKSet](../../../../jwks/remote/functions/createRemoteJWKSet.md) to verify using a remote JSON Web Key Set.
|
||||
|
||||
@@ -2,12 +2,10 @@
|
||||
|
||||
Signing JSON Web Signature (JWS) in General JSON Serialization
|
||||
|
||||
## Index
|
||||
|
||||
### Classes
|
||||
## Classes
|
||||
|
||||
- [GeneralSign](classes/GeneralSign.md)
|
||||
|
||||
### Interfaces
|
||||
## Interfaces
|
||||
|
||||
- [Signature](interfaces/Signature.md)
|
||||
|
||||
@@ -26,11 +26,11 @@ console.log(jws)
|
||||
|
||||
## Constructors
|
||||
|
||||
### new GeneralSign()
|
||||
### Constructor
|
||||
|
||||
▸ **new GeneralSign**(`payload`): [`GeneralSign`](GeneralSign.md)
|
||||
▸ **new GeneralSign**(`payload`): `GeneralSign`
|
||||
|
||||
[GeneralSign](GeneralSign.md) constructor
|
||||
GeneralSign constructor
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -40,13 +40,13 @@ console.log(jws)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`GeneralSign`](GeneralSign.md)
|
||||
`GeneralSign`
|
||||
|
||||
## Methods
|
||||
|
||||
### addSignature()
|
||||
|
||||
▸ **addSignature**(`key`, `options`?): [`Signature`](../interfaces/Signature.md)
|
||||
▸ **addSignature**(`key`, `options?`): [`Signature`](../interfaces/Signature.md)
|
||||
|
||||
Adds an additional signature for the General JWS object.
|
||||
|
||||
@@ -55,7 +55,7 @@ Adds an additional signature for the General JWS object.
|
||||
| Parameter | Type | Description |
|
||||
| ------ | ------ | ------ |
|
||||
| `key` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md) | Private Key or Secret to sign the individual JWS signature with. See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210#jws-alg). |
|
||||
| `options`? | [`SignOptions`](../../../../types/interfaces/SignOptions.md) | JWS Sign options. |
|
||||
| `options?` | [`SignOptions`](../../../../types/interfaces/SignOptions.md) | JWS Sign options. |
|
||||
|
||||
#### Returns
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ Used to build General JWS object's individual signatures.
|
||||
|
||||
### addSignature()
|
||||
|
||||
▸ **addSignature**(...`args`): [`Signature`](Signature.md)
|
||||
▸ **addSignature**(...`args`): `Signature`
|
||||
|
||||
A shorthand for calling addSignature() on the enclosing [GeneralSign](../classes/GeneralSign.md) instance
|
||||
|
||||
@@ -18,11 +18,11 @@ A shorthand for calling addSignature() on the enclosing [GeneralSign](../classes
|
||||
|
||||
| Parameter | Type |
|
||||
| ------ | ------ |
|
||||
| ...`args` | [[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md), [`SignOptions`](../../../../types/interfaces/SignOptions.md)] |
|
||||
| ...`args` | \[[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md), [`SignOptions`](../../../../types/interfaces/SignOptions.md)\] |
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Signature`](Signature.md)
|
||||
`Signature`
|
||||
|
||||
***
|
||||
|
||||
@@ -40,7 +40,7 @@ Returns the enclosing [GeneralSign](../classes/GeneralSign.md) instance
|
||||
|
||||
### setProtectedHeader()
|
||||
|
||||
▸ **setProtectedHeader**(`protectedHeader`): [`Signature`](Signature.md)
|
||||
▸ **setProtectedHeader**(`protectedHeader`): `Signature`
|
||||
|
||||
Sets the JWS Protected Header on the Signature object.
|
||||
|
||||
@@ -52,13 +52,13 @@ Sets the JWS Protected Header on the Signature object.
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Signature`](Signature.md)
|
||||
`Signature`
|
||||
|
||||
***
|
||||
|
||||
### setUnprotectedHeader()
|
||||
|
||||
▸ **setUnprotectedHeader**(`unprotectedHeader`): [`Signature`](Signature.md)
|
||||
▸ **setUnprotectedHeader**(`unprotectedHeader`): `Signature`
|
||||
|
||||
Sets the JWS Unprotected Header on the Signature object.
|
||||
|
||||
@@ -70,7 +70,7 @@ Sets the JWS Unprotected Header on the Signature object.
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Signature`](Signature.md)
|
||||
`Signature`
|
||||
|
||||
***
|
||||
|
||||
@@ -84,7 +84,7 @@ A shorthand for calling encrypt() on the enclosing [GeneralSign](../classes/Gene
|
||||
|
||||
| Parameter | Type |
|
||||
| ------ | ------ |
|
||||
| ...`args` | [] |
|
||||
| ...`args` | \[\] |
|
||||
|
||||
#### Returns
|
||||
|
||||
|
||||
@@ -2,12 +2,10 @@
|
||||
|
||||
Verifying JSON Web Signature (JWS) in General JSON Serialization
|
||||
|
||||
## Index
|
||||
|
||||
### Interfaces
|
||||
## Interfaces
|
||||
|
||||
- [GeneralVerifyGetKey](interfaces/GeneralVerifyGetKey.md)
|
||||
|
||||
### Functions
|
||||
## Functions
|
||||
|
||||
- [generalVerify](functions/generalVerify.md)
|
||||
|
||||
@@ -6,7 +6,7 @@ Support from the community to continue maintaining and improving this module is
|
||||
|
||||
## Call Signature
|
||||
|
||||
▸ **generalVerify**(`jws`, `key`, `options`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`GeneralVerifyResult`](../../../../types/interfaces/GeneralVerifyResult.md)\>
|
||||
▸ **generalVerify**(`jws`, `key`, `options?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`GeneralVerifyResult`](../../../../types/interfaces/GeneralVerifyResult.md)\>
|
||||
|
||||
Verifies the signature and format of and afterwards decodes the General JWS.
|
||||
|
||||
@@ -19,7 +19,7 @@ as from its subpath export `'jose/jws/general/verify'`.
|
||||
| ------ | ------ | ------ |
|
||||
| `jws` | [`GeneralJWSInput`](../../../../types/interfaces/GeneralJWSInput.md) | General JWS. |
|
||||
| `key` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md) | Key to verify the JWS with. See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210#jws-alg). |
|
||||
| `options`? | [`VerifyOptions`](../../../../types/interfaces/VerifyOptions.md) | JWS Verify options. |
|
||||
| `options?` | [`VerifyOptions`](../../../../types/interfaces/VerifyOptions.md) | JWS Verify options. |
|
||||
|
||||
### Returns
|
||||
|
||||
@@ -47,7 +47,7 @@ console.log(new TextDecoder().decode(payload))
|
||||
|
||||
## Call Signature
|
||||
|
||||
▸ **generalVerify**(`jws`, `getKey`, `options`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`GeneralVerifyResult`](../../../../types/interfaces/GeneralVerifyResult.md) & [`ResolvedKey`](../../../../types/interfaces/ResolvedKey.md)\>
|
||||
▸ **generalVerify**(`jws`, `getKey`, `options?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`GeneralVerifyResult`](../../../../types/interfaces/GeneralVerifyResult.md) & [`ResolvedKey`](../../../../types/interfaces/ResolvedKey.md)\>
|
||||
|
||||
### Parameters
|
||||
|
||||
@@ -55,7 +55,7 @@ console.log(new TextDecoder().decode(payload))
|
||||
| ------ | ------ | ------ |
|
||||
| `jws` | [`GeneralJWSInput`](../../../../types/interfaces/GeneralJWSInput.md) | General JWS. |
|
||||
| `getKey` | [`GeneralVerifyGetKey`](../interfaces/GeneralVerifyGetKey.md) | Function resolving a key to verify the JWS with. See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210#jws-alg). |
|
||||
| `options`? | [`VerifyOptions`](../../../../types/interfaces/VerifyOptions.md) | JWS Verify options. |
|
||||
| `options?` | [`VerifyOptions`](../../../../types/interfaces/VerifyOptions.md) | JWS Verify options. |
|
||||
|
||||
### Returns
|
||||
|
||||
|
||||
@@ -13,8 +13,10 @@ verified at the time of this function call.
|
||||
|
||||
▸ **GeneralVerifyGetKey**(`protectedHeader`, `token`): [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md) \| [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md)\>
|
||||
|
||||
Interface for General JWS Verification dynamic key resolution. No token components have been
|
||||
verified at the time of this function call.
|
||||
Dynamic key resolution function. No token components have been verified at the time of this
|
||||
function call.
|
||||
|
||||
If a suitable key for the token cannot be matched, throw an error instead.
|
||||
|
||||
## Parameters
|
||||
|
||||
@@ -26,7 +28,3 @@ verified at the time of this function call.
|
||||
## Returns
|
||||
|
||||
[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md) \| [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../../types/interfaces/KeyObject.md)\>
|
||||
|
||||
## See
|
||||
|
||||
[createRemoteJWKSet](../../../../jwks/remote/functions/createRemoteJWKSet.md) to verify using a remote JSON Web Key Set.
|
||||
|
||||
@@ -2,13 +2,11 @@
|
||||
|
||||
JSON Web Token (JWT) Decryption (JWT is in JWE format)
|
||||
|
||||
## Index
|
||||
|
||||
### Interfaces
|
||||
## Interfaces
|
||||
|
||||
- [JWTDecryptGetKey](interfaces/JWTDecryptGetKey.md)
|
||||
- [JWTDecryptOptions](interfaces/JWTDecryptOptions.md)
|
||||
|
||||
### Functions
|
||||
## Functions
|
||||
|
||||
- [jwtDecrypt](functions/jwtDecrypt.md)
|
||||
|
||||
@@ -6,7 +6,7 @@ Support from the community to continue maintaining and improving this module is
|
||||
|
||||
## Call Signature
|
||||
|
||||
▸ **jwtDecrypt**\<`PayloadType`\>(`jwt`, `key`, `options`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`JWTDecryptResult`](../../../types/interfaces/JWTDecryptResult.md)\<`PayloadType`\>\>
|
||||
▸ **jwtDecrypt**\<`PayloadType`\>(`jwt`, `key`, `options?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`JWTDecryptResult`](../../../types/interfaces/JWTDecryptResult.md)\<`PayloadType`\>\>
|
||||
|
||||
Verifies the JWT format (to be a JWE Compact format), decrypts the ciphertext, validates the JWT
|
||||
Claims Set.
|
||||
@@ -26,7 +26,7 @@ as from its subpath export `'jose/jwt/decrypt'`.
|
||||
| ------ | ------ | ------ |
|
||||
| `jwt` | `string` \| [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) | JSON Web Token value (encoded as JWE). |
|
||||
| `key` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../types/interfaces/KeyObject.md) | Private Key or Secret to decrypt and verify the JWT with. See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210#jwe-alg). |
|
||||
| `options`? | [`JWTDecryptOptions`](../interfaces/JWTDecryptOptions.md) | JWT Decryption and JWT Claims Set validation options. |
|
||||
| `options?` | [`JWTDecryptOptions`](../interfaces/JWTDecryptOptions.md) | JWT Decryption and JWT Claims Set validation options. |
|
||||
|
||||
### Returns
|
||||
|
||||
@@ -50,7 +50,7 @@ console.log(payload)
|
||||
|
||||
## Call Signature
|
||||
|
||||
▸ **jwtDecrypt**\<`PayloadType`\>(`jwt`, `getKey`, `options`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`JWTDecryptResult`](../../../types/interfaces/JWTDecryptResult.md)\<`PayloadType`\> & [`ResolvedKey`](../../../types/interfaces/ResolvedKey.md)\>
|
||||
▸ **jwtDecrypt**\<`PayloadType`\>(`jwt`, `getKey`, `options?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`JWTDecryptResult`](../../../types/interfaces/JWTDecryptResult.md)\<`PayloadType`\> & [`ResolvedKey`](../../../types/interfaces/ResolvedKey.md)\>
|
||||
|
||||
### Type Parameters
|
||||
|
||||
@@ -64,7 +64,7 @@ console.log(payload)
|
||||
| ------ | ------ | ------ |
|
||||
| `jwt` | `string` \| [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) | JSON Web Token value (encoded as JWE). |
|
||||
| `getKey` | [`JWTDecryptGetKey`](../interfaces/JWTDecryptGetKey.md) | Function resolving Private Key or Secret to decrypt and verify the JWT with. See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210#jwe-alg). |
|
||||
| `options`? | [`JWTDecryptOptions`](../interfaces/JWTDecryptOptions.md) | JWT Decryption and JWT Claims Set validation options. |
|
||||
| `options?` | [`JWTDecryptOptions`](../interfaces/JWTDecryptOptions.md) | JWT Decryption and JWT Claims Set validation options. |
|
||||
|
||||
### Returns
|
||||
|
||||
|
||||
@@ -9,8 +9,10 @@ the time of this function call.
|
||||
|
||||
▸ **JWTDecryptGetKey**(`protectedHeader`, `token`): [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../types/interfaces/KeyObject.md) \| [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../types/interfaces/KeyObject.md)\>
|
||||
|
||||
Interface for JWT Decryption dynamic key resolution. No token components have been verified at
|
||||
the time of this function call.
|
||||
Dynamic key resolution function. No token components have been verified at the time of this
|
||||
function call.
|
||||
|
||||
If a suitable key for the token cannot be matched, throw an error instead.
|
||||
|
||||
## Parameters
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ available.
|
||||
|
||||
#### Index Signature
|
||||
|
||||
\[`propName`: `string`\]: `boolean`
|
||||
\[`propName`: `string`\]: `boolean`
|
||||
|
||||
***
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
JSON Web Token (JWT) Encryption (JWT is in JWE format)
|
||||
|
||||
## Index
|
||||
|
||||
### Classes
|
||||
## Classes
|
||||
|
||||
- [EncryptJWT](classes/EncryptJWT.md)
|
||||
|
||||
@@ -26,11 +26,11 @@ console.log(jwt)
|
||||
|
||||
## Constructors
|
||||
|
||||
### new EncryptJWT()
|
||||
### Constructor
|
||||
|
||||
▸ **new EncryptJWT**(`payload`): [`EncryptJWT`](EncryptJWT.md)
|
||||
▸ **new EncryptJWT**(`payload`): `EncryptJWT`
|
||||
|
||||
[EncryptJWT](EncryptJWT.md) constructor
|
||||
EncryptJWT constructor
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -40,13 +40,13 @@ console.log(jwt)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`EncryptJWT`](EncryptJWT.md)
|
||||
`EncryptJWT`
|
||||
|
||||
## Methods
|
||||
|
||||
### encrypt()
|
||||
|
||||
▸ **encrypt**(`key`, `options`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
|
||||
▸ **encrypt**(`key`, `options?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
|
||||
|
||||
Encrypts and returns the JWT.
|
||||
|
||||
@@ -55,7 +55,7 @@ Encrypts and returns the JWT.
|
||||
| Parameter | Type | Description |
|
||||
| ------ | ------ | ------ |
|
||||
| `key` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../types/interfaces/KeyObject.md) | Public Key or Secret to encrypt the JWT with. See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210#jwe-alg). |
|
||||
| `options`? | [`EncryptOptions`](../../../types/interfaces/EncryptOptions.md) | JWE Encryption options. |
|
||||
| `options?` | [`EncryptOptions`](../../../types/interfaces/EncryptOptions.md) | JWE Encryption options. |
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -215,7 +215,7 @@ You should not use this method. It is only really intended for test and vector
|
||||
|
||||
### setIssuedAt()
|
||||
|
||||
▸ **setIssuedAt**(`input`?): `this`
|
||||
▸ **setIssuedAt**(`input?`): `this`
|
||||
|
||||
Set the "iat" (Issued At) Claim.
|
||||
|
||||
@@ -242,7 +242,7 @@ readability when adding to the current unix timestamp.
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| ------ | ------ | ------ |
|
||||
| `input`? | `string` \| `number` \| [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date) | "iat" (Expiration Time) Claim value to set on the JWT Claims Set. |
|
||||
| `input?` | `string` \| `number` \| [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date) | "iat" (Expiration Time) Claim value to set on the JWT Claims Set. |
|
||||
|
||||
#### Returns
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
JSON Web Token (JWT) Signing (JWT is in JWS format)
|
||||
|
||||
## Index
|
||||
|
||||
### Classes
|
||||
## Classes
|
||||
|
||||
- [SignJWT](classes/SignJWT.md)
|
||||
|
||||
@@ -105,11 +105,11 @@ console.log(jwt)
|
||||
|
||||
## Constructors
|
||||
|
||||
### new SignJWT()
|
||||
### Constructor
|
||||
|
||||
▸ **new SignJWT**(`payload`): [`SignJWT`](SignJWT.md)
|
||||
▸ **new SignJWT**(`payload`): `SignJWT`
|
||||
|
||||
[SignJWT](SignJWT.md) constructor
|
||||
SignJWT constructor
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -119,7 +119,7 @@ console.log(jwt)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`SignJWT`](SignJWT.md)
|
||||
`SignJWT`
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -179,7 +179,7 @@ readability when adding to the current unix timestamp.
|
||||
|
||||
### setIssuedAt()
|
||||
|
||||
▸ **setIssuedAt**(`input`?): `this`
|
||||
▸ **setIssuedAt**(`input?`): `this`
|
||||
|
||||
Set the "iat" (Issued At) Claim.
|
||||
|
||||
@@ -206,7 +206,7 @@ readability when adding to the current unix timestamp.
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| ------ | ------ | ------ |
|
||||
| `input`? | `string` \| `number` \| [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date) | "iat" (Expiration Time) Claim value to set on the JWT Claims Set. |
|
||||
| `input?` | `string` \| `number` \| [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date) | "iat" (Expiration Time) Claim value to set on the JWT Claims Set. |
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -324,7 +324,7 @@ Set the "sub" (Subject) Claim.
|
||||
|
||||
### sign()
|
||||
|
||||
▸ **sign**(`key`, `options`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
|
||||
▸ **sign**(`key`, `options?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
|
||||
|
||||
Signs and returns the JWT.
|
||||
|
||||
@@ -333,7 +333,7 @@ Signs and returns the JWT.
|
||||
| Parameter | Type | Description |
|
||||
| ------ | ------ | ------ |
|
||||
| `key` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../types/interfaces/KeyObject.md) | Private Key or Secret to sign the JWT with. See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210#jws-alg). |
|
||||
| `options`? | [`SignOptions`](../../../types/interfaces/SignOptions.md) | JWT Sign options. |
|
||||
| `options?` | [`SignOptions`](../../../types/interfaces/SignOptions.md) | JWT Sign options. |
|
||||
|
||||
#### Returns
|
||||
|
||||
|
||||
@@ -2,12 +2,10 @@
|
||||
|
||||
Unsecured (unsigned & unencrypted) JSON Web Tokens (JWT)
|
||||
|
||||
## Index
|
||||
|
||||
### Classes
|
||||
## Classes
|
||||
|
||||
- [UnsecuredJWT](classes/UnsecuredJWT.md)
|
||||
|
||||
### Interfaces
|
||||
## Interfaces
|
||||
|
||||
- [UnsecuredResult](interfaces/UnsecuredResult.md)
|
||||
|
||||
@@ -37,11 +37,11 @@ console.log(payload)
|
||||
|
||||
## Constructors
|
||||
|
||||
### new UnsecuredJWT()
|
||||
### Constructor
|
||||
|
||||
▸ **new UnsecuredJWT**(`payload`): [`UnsecuredJWT`](UnsecuredJWT.md)
|
||||
▸ **new UnsecuredJWT**(`payload`): `UnsecuredJWT`
|
||||
|
||||
[UnsecuredJWT](UnsecuredJWT.md) constructor
|
||||
UnsecuredJWT constructor
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -51,13 +51,13 @@ console.log(payload)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`UnsecuredJWT`](UnsecuredJWT.md)
|
||||
`UnsecuredJWT`
|
||||
|
||||
## Methods
|
||||
|
||||
### decode()
|
||||
|
||||
▸ `static` **decode**\<`PayloadType`\>(`jwt`, `options`?): [`UnsecuredResult`](../interfaces/UnsecuredResult.md)\<`PayloadType`\>
|
||||
▸ `static` **decode**\<`PayloadType`\>(`jwt`, `options?`): [`UnsecuredResult`](../interfaces/UnsecuredResult.md)\<`PayloadType`\>
|
||||
|
||||
Decodes an unsecured JWT.
|
||||
|
||||
@@ -72,7 +72,7 @@ Decodes an unsecured JWT.
|
||||
| Parameter | Type | Description |
|
||||
| ------ | ------ | ------ |
|
||||
| `jwt` | `string` | Unsecured JWT to decode the payload of. |
|
||||
| `options`? | [`JWTClaimVerificationOptions`](../../../types/interfaces/JWTClaimVerificationOptions.md) | JWT Claims Set validation options. |
|
||||
| `options?` | [`JWTClaimVerificationOptions`](../../../types/interfaces/JWTClaimVerificationOptions.md) | JWT Claims Set validation options. |
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -148,7 +148,7 @@ readability when adding to the current unix timestamp.
|
||||
|
||||
### setIssuedAt()
|
||||
|
||||
▸ **setIssuedAt**(`input`?): `this`
|
||||
▸ **setIssuedAt**(`input?`): `this`
|
||||
|
||||
Set the "iat" (Issued At) Claim.
|
||||
|
||||
@@ -175,7 +175,7 @@ readability when adding to the current unix timestamp.
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| ------ | ------ | ------ |
|
||||
| `input`? | `string` \| `number` \| [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date) | "iat" (Expiration Time) Claim value to set on the JWT Claims Set. |
|
||||
| `input?` | `string` \| `number` \| [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date) | "iat" (Expiration Time) Claim value to set on the JWT Claims Set. |
|
||||
|
||||
#### Returns
|
||||
|
||||
|
||||
@@ -2,13 +2,11 @@
|
||||
|
||||
JSON Web Token (JWT) Verification (JWT is in JWS format)
|
||||
|
||||
## Index
|
||||
|
||||
### Interfaces
|
||||
## Interfaces
|
||||
|
||||
- [JWTVerifyGetKey](interfaces/JWTVerifyGetKey.md)
|
||||
- [JWTVerifyOptions](interfaces/JWTVerifyOptions.md)
|
||||
|
||||
### Functions
|
||||
## Functions
|
||||
|
||||
- [jwtVerify](functions/jwtVerify.md)
|
||||
|
||||
@@ -6,7 +6,7 @@ Support from the community to continue maintaining and improving this module is
|
||||
|
||||
## Call Signature
|
||||
|
||||
▸ **jwtVerify**\<`PayloadType`\>(`jwt`, `key`, `options`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`JWTVerifyResult`](../../../types/interfaces/JWTVerifyResult.md)\<`PayloadType`\>\>
|
||||
▸ **jwtVerify**\<`PayloadType`\>(`jwt`, `key`, `options?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`JWTVerifyResult`](../../../types/interfaces/JWTVerifyResult.md)\<`PayloadType`\>\>
|
||||
|
||||
Verifies the JWT format (to be a JWS Compact format), verifies the JWS signature, validates the
|
||||
JWT Claims Set.
|
||||
@@ -26,7 +26,7 @@ as from its subpath export `'jose/jwt/verify'`.
|
||||
| ------ | ------ | ------ |
|
||||
| `jwt` | `string` \| [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) | JSON Web Token value (encoded as JWS). |
|
||||
| `key` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../types/interfaces/KeyObject.md) | Key to verify the JWT with. See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210#jws-alg). |
|
||||
| `options`? | [`JWTVerifyOptions`](../interfaces/JWTVerifyOptions.md) | JWT Decryption and JWT Claims Set validation options. |
|
||||
| `options?` | [`JWTVerifyOptions`](../interfaces/JWTVerifyOptions.md) | JWT Decryption and JWT Claims Set validation options. |
|
||||
|
||||
### Returns
|
||||
|
||||
@@ -102,7 +102,7 @@ console.log(payload)
|
||||
|
||||
## Call Signature
|
||||
|
||||
▸ **jwtVerify**\<`PayloadType`\>(`jwt`, `getKey`, `options`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`JWTVerifyResult`](../../../types/interfaces/JWTVerifyResult.md)\<`PayloadType`\> & [`ResolvedKey`](../../../types/interfaces/ResolvedKey.md)\>
|
||||
▸ **jwtVerify**\<`PayloadType`\>(`jwt`, `getKey`, `options?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`JWTVerifyResult`](../../../types/interfaces/JWTVerifyResult.md)\<`PayloadType`\> & [`ResolvedKey`](../../../types/interfaces/ResolvedKey.md)\>
|
||||
|
||||
### Type Parameters
|
||||
|
||||
@@ -116,7 +116,7 @@ console.log(payload)
|
||||
| ------ | ------ | ------ |
|
||||
| `jwt` | `string` \| [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) | JSON Web Token value (encoded as JWS). |
|
||||
| `getKey` | [`JWTVerifyGetKey`](../interfaces/JWTVerifyGetKey.md) | Function resolving a key to verify the JWT with. See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210#jws-alg). |
|
||||
| `options`? | [`JWTVerifyOptions`](../interfaces/JWTVerifyOptions.md) | JWT Decryption and JWT Claims Set validation options. |
|
||||
| `options?` | [`JWTVerifyOptions`](../interfaces/JWTVerifyOptions.md) | JWT Decryption and JWT Claims Set validation options. |
|
||||
|
||||
### Returns
|
||||
|
||||
|
||||
@@ -13,8 +13,10 @@ the time of this function call.
|
||||
|
||||
▸ **JWTVerifyGetKey**(`protectedHeader`, `token`): [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../types/interfaces/KeyObject.md) \| [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../types/interfaces/KeyObject.md)\>
|
||||
|
||||
Interface for JWT Verification dynamic key resolution. No token components have been verified at
|
||||
the time of this function call.
|
||||
Dynamic key resolution function. No token components have been verified at the time of this
|
||||
function call.
|
||||
|
||||
If a suitable key for the token cannot be matched, throw an error instead.
|
||||
|
||||
## Parameters
|
||||
|
||||
@@ -26,7 +28,3 @@ the time of this function call.
|
||||
## Returns
|
||||
|
||||
[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../types/interfaces/KeyObject.md) \| [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](../../../types/interfaces/JWK.md) \| [`KeyObject`](../../../types/interfaces/KeyObject.md)\>
|
||||
|
||||
## See
|
||||
|
||||
[createRemoteJWKSet](../../../jwks/remote/functions/createRemoteJWKSet.md) to verify using a remote JSON Web Key Set.
|
||||
|
||||
@@ -67,7 +67,7 @@ available.
|
||||
|
||||
#### Index Signature
|
||||
|
||||
\[`propName`: `string`\]: `boolean`
|
||||
\[`propName`: `string`\]: `boolean`
|
||||
|
||||
***
|
||||
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
|
||||
Cryptographic key export functions
|
||||
|
||||
## Index
|
||||
|
||||
### Functions
|
||||
## Functions
|
||||
|
||||
- [exportJWK](functions/exportJWK.md)
|
||||
- [exportPKCS8](functions/exportPKCS8.md)
|
||||
|
||||
@@ -2,13 +2,11 @@
|
||||
|
||||
Asymmetric key generation
|
||||
|
||||
## Index
|
||||
|
||||
### Interfaces
|
||||
## Interfaces
|
||||
|
||||
- [GenerateKeyPairOptions](interfaces/GenerateKeyPairOptions.md)
|
||||
- [GenerateKeyPairResult](interfaces/GenerateKeyPairResult.md)
|
||||
|
||||
### Functions
|
||||
## Functions
|
||||
|
||||
- [generateKeyPair](functions/generateKeyPair.md)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by [becoming a sponsor](https://github.com/sponsors/panva).
|
||||
|
||||
▸ **generateKeyPair**(`alg`, `options`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`GenerateKeyPairResult`](../interfaces/GenerateKeyPairResult.md)\>
|
||||
▸ **generateKeyPair**(`alg`, `options?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`GenerateKeyPairResult`](../interfaces/GenerateKeyPairResult.md)\>
|
||||
|
||||
Generates a private and a public key for a given JWA algorithm identifier. This can only generate
|
||||
asymmetric key pairs. For symmetric secrets use the `generateSecret` function.
|
||||
@@ -21,7 +21,7 @@ as from its subpath export `'jose/generate/keypair'`.
|
||||
| Parameter | Type | Description |
|
||||
| ------ | ------ | ------ |
|
||||
| `alg` | `string` | JWA Algorithm Identifier to be used with the generated key pair. See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210). |
|
||||
| `options`? | [`GenerateKeyPairOptions`](../interfaces/GenerateKeyPairOptions.md) | Additional options passed down to the key pair generation. |
|
||||
| `options?` | [`GenerateKeyPairOptions`](../interfaces/GenerateKeyPairOptions.md) | Additional options passed down to the key pair generation. |
|
||||
|
||||
## Returns
|
||||
|
||||
|
||||
@@ -2,12 +2,10 @@
|
||||
|
||||
Symmetric key generation
|
||||
|
||||
## Index
|
||||
|
||||
### Interfaces
|
||||
## Interfaces
|
||||
|
||||
- [GenerateSecretOptions](interfaces/GenerateSecretOptions.md)
|
||||
|
||||
### Functions
|
||||
## Functions
|
||||
|
||||
- [generateSecret](functions/generateSecret.md)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by [becoming a sponsor](https://github.com/sponsors/panva).
|
||||
|
||||
▸ **generateSecret**(`alg`, `options`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey)\>
|
||||
▸ **generateSecret**(`alg`, `options?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey)\>
|
||||
|
||||
Generates a symmetric secret key for a given JWA algorithm identifier.
|
||||
|
||||
@@ -23,7 +23,7 @@ as from its subpath export `'jose/generate/secret'`.
|
||||
| Parameter | Type | Description |
|
||||
| ------ | ------ | ------ |
|
||||
| `alg` | `string` | JWA Algorithm Identifier to be used with the generated secret. See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210). |
|
||||
| `options`? | [`GenerateSecretOptions`](../interfaces/GenerateSecretOptions.md) | Additional options passed down to the secret generation. |
|
||||
| `options?` | [`GenerateSecretOptions`](../interfaces/GenerateSecretOptions.md) | Additional options passed down to the secret generation. |
|
||||
|
||||
## Returns
|
||||
|
||||
|
||||
@@ -2,13 +2,11 @@
|
||||
|
||||
Cryptographic key import functions
|
||||
|
||||
## Index
|
||||
|
||||
### Interfaces
|
||||
## Interfaces
|
||||
|
||||
- [KeyImportOptions](interfaces/KeyImportOptions.md)
|
||||
|
||||
### Functions
|
||||
## Functions
|
||||
|
||||
- [importJWK](functions/importJWK.md)
|
||||
- [importPKCS8](functions/importPKCS8.md)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by [becoming a sponsor](https://github.com/sponsors/panva).
|
||||
|
||||
▸ **importJWK**(`jwk`, `alg`?, `options`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey)\>
|
||||
▸ **importJWK**(`jwk`, `alg?`, `options?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey)\>
|
||||
|
||||
Imports a JWK to a [CryptoKey](https://developer.mozilla.org/docs/Web/API/CryptoKey). Either the JWK "alg" (Algorithm) Parameter, or the optional
|
||||
"alg" argument, must be present for asymmetric JSON Web Key imports.
|
||||
@@ -25,8 +25,8 @@ as from its subpath export `'jose/key/import'`.
|
||||
| Parameter | Type | Description |
|
||||
| ------ | ------ | ------ |
|
||||
| `jwk` | [`JWK`](../../../types/interfaces/JWK.md) | JSON Web Key. |
|
||||
| `alg`? | `string` | JSON Web Algorithm identifier to be used with the imported key. Default is the "alg" property on the JWK. See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210). |
|
||||
| `options`? | [`KeyImportOptions`](../interfaces/KeyImportOptions.md) | - |
|
||||
| `alg?` | `string` | JSON Web Algorithm identifier to be used with the imported key. Default is the "alg" property on the JWK. See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210). |
|
||||
| `options?` | [`KeyImportOptions`](../interfaces/KeyImportOptions.md) | - |
|
||||
|
||||
## Returns
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by [becoming a sponsor](https://github.com/sponsors/panva).
|
||||
|
||||
▸ **importPKCS8**(`pkcs8`, `alg`, `options`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey)\>
|
||||
▸ **importPKCS8**(`pkcs8`, `alg`, `options?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey)\>
|
||||
|
||||
Imports a PEM-encoded PKCS#8 string as a [CryptoKey](https://developer.mozilla.org/docs/Web/API/CryptoKey).
|
||||
|
||||
@@ -22,7 +22,7 @@ as from its subpath export `'jose/key/import'`.
|
||||
| ------ | ------ | ------ |
|
||||
| `pkcs8` | `string` | PEM-encoded PKCS#8 string |
|
||||
| `alg` | `string` | JSON Web Algorithm identifier to be used with the imported key. See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210). |
|
||||
| `options`? | [`KeyImportOptions`](../interfaces/KeyImportOptions.md) | - |
|
||||
| `options?` | [`KeyImportOptions`](../interfaces/KeyImportOptions.md) | - |
|
||||
|
||||
## Returns
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by [becoming a sponsor](https://github.com/sponsors/panva).
|
||||
|
||||
▸ **importSPKI**(`spki`, `alg`, `options`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey)\>
|
||||
▸ **importSPKI**(`spki`, `alg`, `options?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey)\>
|
||||
|
||||
Imports a PEM-encoded SPKI string as a [CryptoKey](https://developer.mozilla.org/docs/Web/API/CryptoKey).
|
||||
|
||||
@@ -22,7 +22,7 @@ as from its subpath export `'jose/key/import'`.
|
||||
| ------ | ------ | ------ |
|
||||
| `spki` | `string` | PEM-encoded SPKI string |
|
||||
| `alg` | `string` | JSON Web Algorithm identifier to be used with the imported key. See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210). |
|
||||
| `options`? | [`KeyImportOptions`](../interfaces/KeyImportOptions.md) | - |
|
||||
| `options?` | [`KeyImportOptions`](../interfaces/KeyImportOptions.md) | - |
|
||||
|
||||
## Returns
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by [becoming a sponsor](https://github.com/sponsors/panva).
|
||||
|
||||
▸ **importX509**(`x509`, `alg`, `options`?): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey)\>
|
||||
▸ **importX509**(`x509`, `alg`, `options?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey)\>
|
||||
|
||||
Imports the SPKI from an X.509 string certificate as a [CryptoKey](https://developer.mozilla.org/docs/Web/API/CryptoKey).
|
||||
|
||||
@@ -22,7 +22,7 @@ as from its subpath export `'jose/key/import'`.
|
||||
| ------ | ------ | ------ |
|
||||
| `x509` | `string` | X.509 certificate string |
|
||||
| `alg` | `string` | JSON Web Algorithm identifier to be used with the imported key. See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210). |
|
||||
| `options`? | [`KeyImportOptions`](../interfaces/KeyImportOptions.md) | - |
|
||||
| `options?` | [`KeyImportOptions`](../interfaces/KeyImportOptions.md) | - |
|
||||
|
||||
## Returns
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
# types
|
||||
|
||||
## Index
|
||||
|
||||
### Interfaces
|
||||
## Interfaces
|
||||
|
||||
- [CompactDecryptResult](interfaces/CompactDecryptResult.md)
|
||||
- [CompactJWEHeaderParameters](interfaces/CompactJWEHeaderParameters.md)
|
||||
@@ -49,6 +47,6 @@
|
||||
- [SignOptions](interfaces/SignOptions.md)
|
||||
- [VerifyOptions](interfaces/VerifyOptions.md)
|
||||
|
||||
### Type Aliases
|
||||
## Type Aliases
|
||||
|
||||
- [CryptoKey](type-aliases/CryptoKey.md)
|
||||
|
||||
@@ -8,7 +8,9 @@ Recognized Compact JWE Header Parameters, any other Header Members may also be p
|
||||
|
||||
## Indexable
|
||||
|
||||
\[`propName`: `string`\]: `unknown`
|
||||
\[`propName`: `string`\]: `unknown`
|
||||
|
||||
Any other JWE Header member.
|
||||
|
||||
## Properties
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@ Recognized Compact JWS Header Parameters, any other Header Members may also be p
|
||||
|
||||
## Indexable
|
||||
|
||||
\[`propName`: `string`\]: `unknown`
|
||||
\[`propName`: `string`\]: `unknown`
|
||||
|
||||
Any other JWS Header member.
|
||||
|
||||
## Properties
|
||||
|
||||
|
||||
@@ -31,4 +31,4 @@ available.
|
||||
|
||||
#### Index Signature
|
||||
|
||||
\[`propName`: `string`\]: `boolean`
|
||||
\[`propName`: `string`\]: `boolean`
|
||||
|
||||
@@ -40,7 +40,7 @@ available.
|
||||
|
||||
#### Index Signature
|
||||
|
||||
\[`propName`: `string`\]: `boolean`
|
||||
\[`propName`: `string`\]: `boolean`
|
||||
|
||||
***
|
||||
|
||||
|
||||
@@ -31,4 +31,4 @@ available.
|
||||
|
||||
#### Index Signature
|
||||
|
||||
\[`propName`: `string`\]: `boolean`
|
||||
\[`propName`: `string`\]: `boolean`
|
||||
|
||||
@@ -15,7 +15,10 @@ Generic Interface for consuming operations dynamic key resolution.
|
||||
|
||||
▸ **GetKeyFunction**(`protectedHeader`, `token`): [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](JWK.md) \| [`KeyObject`](KeyObject.md) \| [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`CryptoKey`](https://developer.mozilla.org/docs/Web/API/CryptoKey) \| [`JWK`](JWK.md) \| [`KeyObject`](KeyObject.md)\>
|
||||
|
||||
Generic Interface for consuming operations dynamic key resolution.
|
||||
Dynamic key resolution function. No token components have been verified at the time of this
|
||||
function call.
|
||||
|
||||
If a suitable key for the token cannot be matched, throw an error instead.
|
||||
|
||||
## Parameters
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@ Recognized JWE Header Parameters, any other Header members may also be present.
|
||||
|
||||
## Indexable
|
||||
|
||||
\[`propName`: `string`\]: `unknown`
|
||||
\[`propName`: `string`\]: `unknown`
|
||||
|
||||
Any other JWE Header member.
|
||||
|
||||
## Properties
|
||||
|
||||
|
||||
@@ -9,15 +9,15 @@ JSON Web Key ([JWK](https://www.rfc-editor.org/rfc/rfc7517)). "RSA", "EC", "OKP"
|
||||
|
||||
## See
|
||||
|
||||
- [JWK_AKP_Public](JWK_AKP_Public.md)
|
||||
- [JWK_AKP_Private](JWK_AKP_Private.md)
|
||||
- [JWK_OKP_Public](JWK_OKP_Public.md)
|
||||
- [JWK_OKP_Private](JWK_OKP_Private.md)
|
||||
- [JWK_EC_Public](JWK_EC_Public.md)
|
||||
- [JWK_EC_Private](JWK_EC_Private.md)
|
||||
- [JWK_RSA_Public](JWK_RSA_Public.md)
|
||||
- [JWK_RSA_Private](JWK_RSA_Private.md)
|
||||
- [JWK_oct](JWK_oct.md)
|
||||
- [JWK\_AKP\_Public](JWK_AKP_Public.md)
|
||||
- [JWK\_AKP\_Private](JWK_AKP_Private.md)
|
||||
- [JWK\_OKP\_Public](JWK_OKP_Public.md)
|
||||
- [JWK\_OKP\_Private](JWK_OKP_Private.md)
|
||||
- [JWK\_EC\_Public](JWK_EC_Public.md)
|
||||
- [JWK\_EC\_Private](JWK_EC_Private.md)
|
||||
- [JWK\_RSA\_Public](JWK_RSA_Public.md)
|
||||
- [JWK\_RSA\_Private](JWK_RSA_Private.md)
|
||||
- [JWK\_oct](JWK_oct.md)
|
||||
|
||||
## Properties
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@ Recognized JWS Header Parameters, any other Header Members may also be present.
|
||||
|
||||
## Indexable
|
||||
|
||||
\[`propName`: `string`\]: `unknown`
|
||||
\[`propName`: `string`\]: `unknown`
|
||||
|
||||
Any other JWS Header member.
|
||||
|
||||
## Properties
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ Clock skew tolerance
|
||||
- Resolved into a number of seconds when a string (e.g. "5 seconds", "10 minutes", "2 hours").
|
||||
|
||||
Used when validating the JWT "nbf" (Not Before) and "exp" (Expiration Time) claims, and when
|
||||
validating the "iat" (Issued At) claim if the [`maxTokenAge` option](JWTClaimVerificationOptions.md#maxtokenage) is set.
|
||||
validating the "iat" (Issued At) claim if the [`maxTokenAge` option](#maxtokenage) is set.
|
||||
|
||||
***
|
||||
|
||||
@@ -68,10 +68,10 @@ This option makes the JWT "iat" (Issued At) Claim presence required.
|
||||
• `optional` **requiredClaims**: `string`[]
|
||||
|
||||
Array of required Claim Names that must be present in the JWT Claims Set. Default is that: if
|
||||
the [`issuer` option](JWTClaimVerificationOptions.md#issuer) is set, then JWT "iss" (Issuer) Claim must be present; if the
|
||||
[`audience` option](JWTClaimVerificationOptions.md#audience) is set, then JWT "aud" (Audience) Claim must be present; if
|
||||
the [`subject` option](JWTClaimVerificationOptions.md#subject) is set, then JWT "sub" (Subject) Claim must be present; if
|
||||
the [`maxTokenAge` option](JWTClaimVerificationOptions.md#maxtokenage) is set, then JWT "iat" (Issued At) Claim must be
|
||||
the [`issuer` option](#issuer) is set, then JWT "iss" (Issuer) Claim must be present; if the
|
||||
[`audience` option](#audience) is set, then JWT "aud" (Audience) Claim must be present; if
|
||||
the [`subject` option](#subject) is set, then JWT "sub" (Subject) Claim must be present; if
|
||||
the [`maxTokenAge` option](#maxtokenage) is set, then JWT "iat" (Issued At) Claim must be
|
||||
present.
|
||||
|
||||
***
|
||||
|
||||
@@ -8,7 +8,9 @@ Recognized Signed JWT Header Parameters, any other Header Members may also be pr
|
||||
|
||||
## Indexable
|
||||
|
||||
\[`propName`: `string`\]: `unknown`
|
||||
\[`propName`: `string`\]: `unknown`
|
||||
|
||||
Any other JWS Header member.
|
||||
|
||||
## Properties
|
||||
|
||||
|
||||
@@ -8,7 +8,9 @@ Recognized JWT Claims Set members, any other members may also be present.
|
||||
|
||||
## Indexable
|
||||
|
||||
\[`propName`: `string`\]: `unknown`
|
||||
\[`propName`: `string`\]: `unknown`
|
||||
|
||||
Any other JWT Claim Set member.
|
||||
|
||||
## Properties
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ readability when adding to the current unix timestamp.
|
||||
|
||||
### setIssuedAt()
|
||||
|
||||
▸ **setIssuedAt**(`input`?): `this`
|
||||
▸ **setIssuedAt**(`input?`): `this`
|
||||
|
||||
Set the "iat" (Issued At) Claim.
|
||||
|
||||
@@ -91,7 +91,7 @@ readability when adding to the current unix timestamp.
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| ------ | ------ | ------ |
|
||||
| `input`? | `string` \| `number` \| [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date) | "iat" (Expiration Time) Claim value to set on the JWT Claims Set. |
|
||||
| `input?` | `string` \| `number` \| [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date) | "iat" (Expiration Time) Claim value to set on the JWT Claims Set. |
|
||||
|
||||
#### Returns
|
||||
|
||||
|
||||
@@ -31,4 +31,4 @@ available.
|
||||
|
||||
#### Index Signature
|
||||
|
||||
\[`propName`: `string`\]: `boolean`
|
||||
\[`propName`: `string`\]: `boolean`
|
||||
|
||||
@@ -43,4 +43,4 @@ available.
|
||||
|
||||
#### Index Signature
|
||||
|
||||
\[`propName`: `string`\]: `boolean`
|
||||
\[`propName`: `string`\]: `boolean`
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by [becoming a sponsor](https://github.com/sponsors/panva).
|
||||
|
||||
• **CryptoKey**: [`Extract`](https://www.typescriptlang.org/docs/handbook/utility-types.html#extracttype-union)\<[`Awaited`](https://www.typescriptlang.org/docs/handbook/utility-types.html#awaitedtype)\<[`ReturnType`](https://www.typescriptlang.org/docs/handbook/utility-types.html#returntypetype)\<*typeof* [`crypto.subtle.generateKey`](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey)\>\>, `object`\>
|
||||
• **CryptoKey** = [`Extract`](https://www.typescriptlang.org/docs/handbook/utility-types.html#extracttype-union)\<[`Awaited`](https://www.typescriptlang.org/docs/handbook/utility-types.html#awaitedtype)\<[`ReturnType`](https://www.typescriptlang.org/docs/handbook/utility-types.html#returntypetype)\<*typeof* [`crypto.subtle.generateKey`](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey)\>\>, \{ `type`: `string`; \}\>
|
||||
|
||||
[CryptoKey](https://developer.mozilla.org/docs/Web/API/CryptoKey) is a representation of a key/secret available in all supported runtimes. In
|
||||
addition to the [Key Import Functions](../../key/import/README.md) you may use the
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
|
||||
Base64URL encoding and decoding utilities
|
||||
|
||||
## Index
|
||||
|
||||
### Functions
|
||||
## Functions
|
||||
|
||||
- [decode](functions/decode.md)
|
||||
- [encode](functions/encode.md)
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
JSON Web Token (JWT) Claims Set Decoding (no validation, no signature checking)
|
||||
|
||||
## Index
|
||||
|
||||
### Functions
|
||||
## Functions
|
||||
|
||||
- [decodeJwt](functions/decodeJwt.md)
|
||||
|
||||
@@ -2,12 +2,10 @@
|
||||
|
||||
JOSE Protected Header Decoding (JWE, JWS, all serialization syntaxes)
|
||||
|
||||
## Index
|
||||
|
||||
### Type Aliases
|
||||
## Type Aliases
|
||||
|
||||
- [ProtectedHeaderParameters](type-aliases/ProtectedHeaderParameters.md)
|
||||
|
||||
### Functions
|
||||
## Functions
|
||||
|
||||
- [decodeProtectedHeader](functions/decodeProtectedHeader.md)
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
|
||||
Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by [becoming a sponsor](https://github.com/sponsors/panva).
|
||||
|
||||
• **ProtectedHeaderParameters**: [`JWSHeaderParameters`](../../../types/interfaces/JWSHeaderParameters.md) & [`JWEHeaderParameters`](../../../types/interfaces/JWEHeaderParameters.md)
|
||||
• **ProtectedHeaderParameters** = [`JWSHeaderParameters`](../../../types/interfaces/JWSHeaderParameters.md) & [`JWEHeaderParameters`](../../../types/interfaces/JWEHeaderParameters.md)
|
||||
|
||||
JWE and JWS Header Parameters
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
|
||||
JOSE module errors and error codes
|
||||
|
||||
## Index
|
||||
|
||||
### Classes
|
||||
## Classes
|
||||
|
||||
- [JOSEAlgNotAllowed](classes/JOSEAlgNotAllowed.md)
|
||||
- [JOSEError](classes/JOSEError.md)
|
||||
|
||||
@@ -30,4 +30,4 @@ if (err instanceof jose.errors.JOSEAlgNotAllowed) {
|
||||
|
||||
• **code**: `string` = `'ERR_JOSE_ALG_NOT_ALLOWED'`
|
||||
|
||||
A unique error code for [JOSEAlgNotAllowed](JOSEAlgNotAllowed.md).
|
||||
A unique error code for JOSEAlgNotAllowed.
|
||||
|
||||
@@ -22,4 +22,4 @@ if (err instanceof jose.errors.JOSEError) {
|
||||
|
||||
• **code**: `string` = `'ERR_JOSE_GENERIC'`
|
||||
|
||||
A unique error code for [JOSEError](JOSEError.md).
|
||||
A unique error code for JOSEError.
|
||||
|
||||
@@ -31,4 +31,4 @@ if (err instanceof jose.errors.JOSENotSupported) {
|
||||
|
||||
• **code**: `string` = `'ERR_JOSE_NOT_SUPPORTED'`
|
||||
|
||||
A unique error code for [JOSENotSupported](JOSENotSupported.md).
|
||||
A unique error code for JOSENotSupported.
|
||||
|
||||
@@ -30,4 +30,4 @@ if (err instanceof jose.errors.JWEDecryptionFailed) {
|
||||
|
||||
• **code**: `string` = `'ERR_JWE_DECRYPTION_FAILED'`
|
||||
|
||||
A unique error code for [JWEDecryptionFailed](JWEDecryptionFailed.md).
|
||||
A unique error code for JWEDecryptionFailed.
|
||||
|
||||
@@ -30,4 +30,4 @@ if (err instanceof jose.errors.JWEInvalid) {
|
||||
|
||||
• **code**: `string` = `'ERR_JWE_INVALID'`
|
||||
|
||||
A unique error code for [JWEInvalid](JWEInvalid.md).
|
||||
A unique error code for JWEInvalid.
|
||||
|
||||
@@ -30,4 +30,4 @@ if (err instanceof jose.errors.JWKInvalid) {
|
||||
|
||||
• **code**: `string` = `'ERR_JWK_INVALID'`
|
||||
|
||||
A unique error code for [JWKInvalid](JWKInvalid.md).
|
||||
A unique error code for JWKInvalid.
|
||||
|
||||
@@ -30,4 +30,4 @@ if (err instanceof jose.errors.JWKSInvalid) {
|
||||
|
||||
• **code**: `string` = `'ERR_JWKS_INVALID'`
|
||||
|
||||
A unique error code for [JWKSInvalid](JWKSInvalid.md).
|
||||
A unique error code for JWKSInvalid.
|
||||
|
||||
@@ -30,4 +30,4 @@ if (err instanceof jose.errors.JWKSMultipleMatchingKeys) {
|
||||
|
||||
• **code**: `string` = `'ERR_JWKS_MULTIPLE_MATCHING_KEYS'`
|
||||
|
||||
A unique error code for [JWKSMultipleMatchingKeys](JWKSMultipleMatchingKeys.md).
|
||||
A unique error code for JWKSMultipleMatchingKeys.
|
||||
|
||||
@@ -30,4 +30,4 @@ if (err instanceof jose.errors.JWKSNoMatchingKey) {
|
||||
|
||||
• **code**: `string` = `'ERR_JWKS_NO_MATCHING_KEY'`
|
||||
|
||||
A unique error code for [JWKSNoMatchingKey](JWKSNoMatchingKey.md).
|
||||
A unique error code for JWKSNoMatchingKey.
|
||||
|
||||
@@ -30,4 +30,4 @@ if (err instanceof jose.errors.JWKSTimeout) {
|
||||
|
||||
• **code**: `string` = `'ERR_JWKS_TIMEOUT'`
|
||||
|
||||
A unique error code for [JWKSTimeout](JWKSTimeout.md).
|
||||
A unique error code for JWKSTimeout.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user