Skip to content

Commit

Permalink
chore: format and re-run docs
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Sep 19, 2023
1 parent f8748b9 commit 7c5a5a5
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 21 deletions.
4 changes: 2 additions & 2 deletions docs/interfaces/jwe_compact_decrypt.CompactDecryptGetKey.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ verified at the time of this function call.

**CompactDecryptGetKey**(`protectedHeader`, `token`): [`Uint8Array`]( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array ) \| [`KeyLike`](../types/types.KeyLike.md) \| [`Promise`]( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise )<[`Uint8Array`]( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array ) \| [`KeyLike`](../types/types.KeyLike.md)\>

Dynamic key resolution function. 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 you cannot match a key suitable for the token, throw an error instead.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ verified at the time of this function call.

**FlattenedDecryptGetKey**(`protectedHeader`, `token`): [`Uint8Array`]( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array ) \| [`KeyLike`](../types/types.KeyLike.md) \| [`Promise`]( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise )<[`Uint8Array`]( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array ) \| [`KeyLike`](../types/types.KeyLike.md)\>

Dynamic key resolution function. 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 you cannot match a key suitable for the token, throw an error instead.

Expand Down
4 changes: 2 additions & 2 deletions docs/interfaces/jwe_general_decrypt.GeneralDecryptGetKey.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ verified at the time of this function call.

**GeneralDecryptGetKey**(`protectedHeader`, `token`): [`Uint8Array`]( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array ) \| [`KeyLike`](../types/types.KeyLike.md) \| [`Promise`]( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise )<[`Uint8Array`]( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array ) \| [`KeyLike`](../types/types.KeyLike.md)\>

Dynamic key resolution function. 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 you cannot match a key suitable for the token, throw an error instead.

Expand Down
4 changes: 2 additions & 2 deletions docs/interfaces/jws_compact_verify.CompactVerifyGetKey.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ verified at the time of this function call.

**CompactVerifyGetKey**(`protectedHeader`, `token`): [`Uint8Array`]( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array ) \| [`KeyLike`](../types/types.KeyLike.md) \| [`Promise`]( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise )<[`Uint8Array`]( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array ) \| [`KeyLike`](../types/types.KeyLike.md)\>

Dynamic key resolution function. 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 you cannot match a key suitable for the token, throw an error instead.

Expand Down
4 changes: 2 additions & 2 deletions docs/interfaces/jws_flattened_verify.FlattenedVerifyGetKey.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ verified at the time of this function call.

**FlattenedVerifyGetKey**(`protectedHeader`, `token`): [`Uint8Array`]( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array ) \| [`KeyLike`](../types/types.KeyLike.md) \| [`Promise`]( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise )<[`Uint8Array`]( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array ) \| [`KeyLike`](../types/types.KeyLike.md)\>

Dynamic key resolution function. 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 you cannot match a key suitable for the token, throw an error instead.

Expand Down
4 changes: 2 additions & 2 deletions docs/interfaces/jws_general_verify.GeneralVerifyGetKey.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ verified at the time of this function call.

**GeneralVerifyGetKey**(`protectedHeader`, `token`): [`Uint8Array`]( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array ) \| [`KeyLike`](../types/types.KeyLike.md) \| [`Promise`]( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise )<[`Uint8Array`]( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array ) \| [`KeyLike`](../types/types.KeyLike.md)\>

Dynamic key resolution function. 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 you cannot match a key suitable for the token, throw an error instead.

Expand Down
4 changes: 2 additions & 2 deletions docs/interfaces/jwt_decrypt.JWTDecryptGetKey.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ the time of this function call.

**JWTDecryptGetKey**(`protectedHeader`, `token`): [`Uint8Array`]( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array ) \| [`KeyLike`](../types/types.KeyLike.md) \| [`Promise`]( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise )<[`Uint8Array`]( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array ) \| [`KeyLike`](../types/types.KeyLike.md)\>

Dynamic key resolution function. 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 you cannot match a key suitable for the token, throw an error instead.

Expand Down
4 changes: 2 additions & 2 deletions docs/interfaces/jwt_verify.JWTVerifyGetKey.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ the time of this function call.

**JWTVerifyGetKey**(`protectedHeader`, `token`): [`Uint8Array`]( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array ) \| [`KeyLike`](../types/types.KeyLike.md) \| [`Promise`]( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise )<[`Uint8Array`]( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array ) \| [`KeyLike`](../types/types.KeyLike.md)\>

Dynamic key resolution function. 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 you cannot match a key suitable for the token, throw an error instead.

Expand Down
4 changes: 2 additions & 2 deletions docs/interfaces/types.GetKeyFunction.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ Generic Interface for consuming operations dynamic key resolution.

**GetKeyFunction**(`protectedHeader`, `token`): [`Uint8Array`]( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array ) \| [`KeyLike`](../types/types.KeyLike.md) \| [`Promise`]( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise )<[`Uint8Array`]( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array ) \| [`KeyLike`](../types/types.KeyLike.md)\>

Dynamic key resolution function. 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 you cannot match a key suitable for the token, throw an error instead.

Expand Down
9 changes: 6 additions & 3 deletions src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,18 @@ export interface JWK {
*/
export interface GetKeyFunction<IProtectedHeader, IToken> {
/**
* Dynamic key resolution function. 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 you cannot match a key suitable for the token, throw an error instead.
*
* @param protectedHeader JWE or JWS Protected Header.
* @param token The consumed JWE or JWS token.
*/
(protectedHeader: IProtectedHeader, token: IToken): Promise<KeyLike | Uint8Array> | KeyLike | Uint8Array
(
protectedHeader: IProtectedHeader,
token: IToken,
): Promise<KeyLike | Uint8Array> | KeyLike | Uint8Array
}

/**
Expand Down

0 comments on commit 7c5a5a5

Please sign in to comment.