Skip to content

Commit

Permalink
fix: make jose.EmbeddedJWK arguments optional
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Feb 27, 2023
1 parent 92ce7c2 commit 20610a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/jwk/embedded.ts
Expand Up @@ -25,12 +25,12 @@ import { JWSInvalid } from '../util/errors.js'
* ```
*/
export async function EmbeddedJWK(
protectedHeader: JWSHeaderParameters,
token: FlattenedJWSInput,
): Promise<KeyLike> {
protectedHeader?: JWSHeaderParameters,
token?: FlattenedJWSInput,
const joseHeader = {
...protectedHeader,
...token.header,
...token?.header,
}
if (!isObject(joseHeader.jwk)) {
throw new JWSInvalid('"jwk" (JSON Web Key) Header Parameter must be a JSON object')
Expand Down

0 comments on commit 20610a9

Please sign in to comment.