Skip to main content
Version: 1.4

Class: JwsHeader

identity_wasm.JwsHeader

Table of contents

Constructors

Methods

Constructors

constructor

new JwsHeader()

Create a new empty JwsHeader.

Methods

alg

alg(): undefined | JwsAlgorithm

Returns the value for the algorithm claim (alg).

Returns

undefined | JwsAlgorithm


setAlg

setAlg(value): void

Sets a value for the algorithm claim (alg).

Parameters

NameType
valueJwsAlgorithm

Returns

void


b64

b64(): undefined | boolean

Returns the value of the base64url-encode payload claim (b64).

Returns

undefined | boolean


setB64

setB64(value): void

Sets a value for the base64url-encode payload claim (b64).

Parameters

NameType
valueboolean

Returns

void


custom

custom(): undefined | Record\<string, any>

Additional header parameters.

Returns

undefined | Record\<string, any>


has

has(claim): boolean

Parameters

NameType
claimstring

Returns

boolean


isDisjoint

isDisjoint(other): boolean

Returns true if none of the fields are set in both self and other.

Parameters

NameType
otherJwsHeader

Returns

boolean


jku

jku(): undefined | string

Returns the value of the JWK Set URL claim (jku).

Returns

undefined | string


setJku

setJku(value): void

Sets a value for the JWK Set URL claim (jku).

Parameters

NameType
valuestring

Returns

void


jwk

jwk(): undefined | Jwk

Returns the value of the JWK claim (jwk).

Returns

undefined | Jwk


setJwk

setJwk(value): void

Sets a value for the JWK claim (jwk).

Parameters

NameType
valueJwk

Returns

void


kid

kid(): undefined | string

Returns the value of the key ID claim (kid).

Returns

undefined | string


setKid

setKid(value): void

Sets a value for the key ID claim (kid).

Parameters

NameType
valuestring

Returns

void


x5u

x5u(): undefined | string

Returns the value of the X.509 URL claim (x5u).

Returns

undefined | string


setX5u

setX5u(value): void

Sets a value for the X.509 URL claim (x5u).

Parameters

NameType
valuestring

Returns

void


x5c

x5c(): string[]

Returns the value of the X.509 certificate chain claim (x5c).

Returns

string[]


setX5c

setX5c(value): void

Sets values for the X.509 certificate chain claim (x5c).

Parameters

NameType
valuestring[]

Returns

void


x5t

x5t(): undefined | string

Returns the value of the X.509 certificate SHA-1 thumbprint claim (x5t).

Returns

undefined | string


setX5t

setX5t(value): void

Sets a value for the X.509 certificate SHA-1 thumbprint claim (x5t).

Parameters

NameType
valuestring

Returns

void


x5tS256

x5tS256(): undefined | string

Returns the value of the X.509 certificate SHA-256 thumbprint claim (x5t#S256).

Returns

undefined | string


setX5tS256

setX5tS256(value): void

Sets a value for the X.509 certificate SHA-256 thumbprint claim (x5t#S256).

Parameters

NameType
valuestring

Returns

void


typ

typ(): undefined | string

Returns the value of the token type claim (typ).

Returns

undefined | string


setTyp

setTyp(value): void

Sets a value for the token type claim (typ).

Parameters

NameType
valuestring

Returns

void


cty

cty(): undefined | string

Returns the value of the content type claim (cty).

Returns

undefined | string


setCty

setCty(value): void

Sets a value for the content type claim (cty).

Parameters

NameType
valuestring

Returns

void


crit

crit(): string[]

Returns the value of the critical claim (crit).

Returns

string[]


setCrit

setCrit(value): void

Sets values for the critical claim (crit).

Parameters

NameType
valuestring[]

Returns

void


url

url(): undefined | string

Returns the value of the url claim (url).

Returns

undefined | string


setUrl

setUrl(value): void

Sets a value for the url claim (url).

Parameters

NameType
valuestring

Returns

void


nonce

nonce(): undefined | string

Returns the value of the nonce claim (nonce).

Returns

undefined | string


setNonce

setNonce(value): void

Sets a value for the nonce claim (nonce).

Parameters

NameType
valuestring

Returns

void


toJSON

toJSON(): any

Serializes this to a JSON object.

Returns

any


fromJSON

Static fromJSON(json): JwsHeader

Deserializes an instance from a JSON object.

Parameters

NameType
jsonany

Returns

JwsHeader


clone

clone(): JwsHeader

Deep clones the object.

Returns

JwsHeader