Skip to content

Commit

Permalink
docs: mention signed JWT alg as required
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Nov 11, 2021
1 parent 7645ff0 commit 2e2b79d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/classes/jwt_sign.SignJWT.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ Sets the JWS Protected Header on the SignJWT object.

| Name | Type | Description |
| :------ | :------ | :------ |
| `protectedHeader` | [`JWSHeaderParameters`](../interfaces/types.JWSHeaderParameters.md) | JWS Protected Header. |
| `protectedHeader` | [`JWSHeaderParameters`](../interfaces/types.JWSHeaderParameters.md) | JWS Protected Header. Must contain an "alg" (JWS Algorithm) property. |

#### Returns

Expand Down
1 change: 1 addition & 0 deletions src/jwt/sign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export class SignJWT extends ProduceJWT {
* Sets the JWS Protected Header on the SignJWT object.
*
* @param protectedHeader JWS Protected Header.
* Must contain an "alg" (JWS Algorithm) property.
*/
setProtectedHeader(protectedHeader: JWSHeaderParameters) {
this._protectedHeader = protectedHeader
Expand Down

0 comments on commit 2e2b79d

Please sign in to comment.