Class: JwsHeader
identity_wasm.JwsHeader
Table of contents
Constructors
Methods
- alg
- setAlg
- b64
- setB64
- custom
- has
- isDisjoint
- jku
- setJku
- jwk
- setJwk
- kid
- setKid
- x5u
- setX5u
- x5c
- setX5c
- x5t
- setX5t
- x5tS256
- setX5tS256
- typ
- setTyp
- cty
- setCty
- crit
- setCrit
- url
- setUrl
- nonce
- setNonce
- toJSON
- fromJSON
- clone
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
| Name | Type |
|---|---|
value | JwsAlgorithm |
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
| Name | Type |
|---|---|
value | boolean |
Returns
void
custom
▸ custom(): undefined | Record\<string, any>
Additional header parameters.
Returns
undefined | Record\<string, any>
has
▸ has(claim): boolean
Parameters
| Name | Type |
|---|---|
claim | string |
Returns
boolean
isDisjoint
▸ isDisjoint(other): boolean
Returns true if none of the fields are set in both self and other.
Parameters
| Name | Type |
|---|---|
other | JwsHeader |
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
| Name | Type |
|---|---|
value | string |
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
| Name | Type |
|---|---|
value | Jwk |
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
| Name | Type |
|---|---|
value | string |
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
| Name | Type |
|---|---|
value | string |
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
| Name | Type |
|---|---|
value | string[] |
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
| Name | Type |
|---|---|
value | string |
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
| Name | Type |
|---|---|
value | string |
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
| Name | Type |
|---|---|
value | string |
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
| Name | Type |
|---|---|
value | string |
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
| Name | Type |
|---|---|
value | string[] |
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
| Name | Type |
|---|---|
value | string |
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
| Name | Type |
|---|---|
value | string |
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
| Name | Type |
|---|---|
json | any |
Returns
clone
▸ clone(): JwsHeader
Deep clones the object.