Skip to main content

EthSignJWT

@nevermined-io/sdk - v3.0.41 / EthSignJWT

Class: EthSignJWT

Hierarchy

  • SignJWT

    EthSignJWT

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new EthSignJWT(payload): EthSignJWT

Parameters

NameTypeDescription
payloadJWTPayloadThe JWT Claims Set object.

Returns

EthSignJWT

Inherited from

SignJWT.constructor

Defined in

node_modules/jose/dist/types/jwt/produce.d.ts:6

Properties

_payload

Protected _payload: JWTPayload

Inherited from

SignJWT._payload

Defined in

node_modules/jose/dist/types/jwt/produce.d.ts:4


protectedHeader

protectedHeader: JWSHeaderParameters

Defined in

src/nevermined/utils/JwtUtils.ts:12

Methods

base64url

base64url(input): string

Parameters

NameType
inputstring | Uint8Array

Returns

string

Defined in

src/nevermined/utils/JwtUtils.ts:89


concat

concat(...buffers): Uint8Array

Parameters

NameType
...buffersUint8Array[]

Returns

Uint8Array

Defined in

src/nevermined/utils/JwtUtils.ts:97


ethSign

ethSign(signatureUtils, account, eip712Data?): Promise\<string>

Parameters

NameType
signatureUtilsSignatureUtils
accountNvmAccount
eip712Data?Eip712Data

Returns

Promise\<string>

Defined in

src/nevermined/utils/JwtUtils.ts:19


setAudience

setAudience(audience): this

Set "aud" (Audience) Claim.

Parameters

NameTypeDescription
audiencestring | string[]"aud" (Audience) Claim value to set on the JWT Claims Set.

Returns

this

Inherited from

SignJWT.setAudience

Defined in

node_modules/jose/dist/types/jwt/produce.d.ts:24


setExpirationTime

setExpirationTime(input): this

Set "exp" (Expiration Time) Claim.

Parameters

NameTypeDescription
inputstring | number"exp" (Expiration Time) Claim value to set on the JWT Claims Set. When number is passed that is used as a value, when string is passed it is resolved to a time span and added to the current timestamp.

Returns

this

Inherited from

SignJWT.setExpirationTime

Defined in

node_modules/jose/dist/types/jwt/produce.d.ts:46


setIssuedAt

setIssuedAt(input?): this

Set "iat" (Issued At) Claim.

Parameters

NameTypeDescription
input?number"iat" (Issued At) Claim value to set on the JWT Claims Set. Default is current timestamp.

Returns

this

Inherited from

SignJWT.setIssuedAt

Defined in

node_modules/jose/dist/types/jwt/produce.d.ts:53


setIssuer

setIssuer(issuer): this

Set "iss" (Issuer) Claim.

Parameters

NameTypeDescription
issuerstring"Issuer" Claim value to set on the JWT Claims Set.

Returns

this

Inherited from

SignJWT.setIssuer

Defined in

node_modules/jose/dist/types/jwt/produce.d.ts:12


setJti

setJti(jwtId): this

Set "jti" (JWT ID) Claim.

Parameters

NameTypeDescription
jwtIdstring"jti" (JWT ID) Claim value to set on the JWT Claims Set.

Returns

this

Inherited from

SignJWT.setJti

Defined in

node_modules/jose/dist/types/jwt/produce.d.ts:30


setNotBefore

setNotBefore(input): this

Set "nbf" (Not Before) Claim.

Parameters

NameTypeDescription
inputstring | number"nbf" (Not Before) Claim value to set on the JWT Claims Set. When number is passed that is used as a value, when string is passed it is resolved to a time span and added to the current timestamp.

Returns

this

Inherited from

SignJWT.setNotBefore

Defined in

node_modules/jose/dist/types/jwt/produce.d.ts:38


setProtectedHeader

setProtectedHeader(protectedHeader): EthSignJWT

Parameters

NameType
protectedHeaderJWSHeaderParameters

Returns

EthSignJWT

Overrides

SignJWT.setProtectedHeader

Defined in

src/nevermined/utils/JwtUtils.ts:14


setSubject

setSubject(subject): this

Set "sub" (Subject) Claim.

Parameters

NameTypeDescription
subjectstring"sub" (Subject) Claim value to set on the JWT Claims Set.

Returns

this

Inherited from

SignJWT.setSubject

Defined in

node_modules/jose/dist/types/jwt/produce.d.ts:18


sign

sign(key, options?): Promise\<string>

Signs and returns the JWT.

Parameters

NameTypeDescription
keyUint8Array | KeyLikePrivate Key or Secret to sign the JWT with. See Algorithm Key Requirements.
options?SignOptionsJWT Sign options.

Returns

Promise\<string>

Inherited from

SignJWT.sign

Defined in

node_modules/jose/dist/types/jwt/sign.d.ts:22


signText

signText(text, account): Promise\<undefined | string>

Parameters

NameType
textstring | Uint8Array
accountAccount

Returns

Promise\<undefined | string>

Defined in

src/nevermined/utils/JwtUtils.ts:75