Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/jose/jwt/sign.ts>SignJWT#setProtectedHeader

"JSON Web Almost Everything" - JWA, JWS, JWE, JWT, JWK, JWKS with no dependencies using runtime's native crypto in Node.js, Browser, Cloudflare Workers, Electron, and Deno.
Extremely Popular
Go to Latest
method SignJWT.prototype.setProtectedHeader
import { SignJWT } from "https://deno.land/x/jose@v4.9.1/jwt/sign.ts";

Sets the JWS Protected Header on the SignJWT object.

Parameters

protectedHeader: JWTHeaderParameters

JWS Protected Header. Must contain an "alg" (JWS Algorithm) property.