@nevermined-io/sdk - v3.0.44 / EthSignJWT
SignJWT
↳ EthSignJWT
• new EthSignJWT(payload
): EthSignJWT
Name | Type | Description |
---|---|---|
payload |
JWTPayload |
The JWT Claims Set object. |
SignJWT.constructor
node_modules/jose/dist/types/jwt/produce.d.ts:6
• Protected
_payload: JWTPayload
SignJWT._payload
node_modules/jose/dist/types/jwt/produce.d.ts:4
• protectedHeader: JWSHeaderParameters
src/nevermined/utils/JwtUtils.ts:12
▸ base64url(input
): string
Name | Type |
---|---|
input |
string | Uint8Array |
string
src/nevermined/utils/JwtUtils.ts:89
▸ concat(...buffers
): Uint8Array
Name | Type |
---|---|
...buffers |
Uint8Array [] |
Uint8Array
src/nevermined/utils/JwtUtils.ts:97
▸ ethSign(signatureUtils
, account
, eip712Data?
): Promise
<string
>
Name | Type |
---|---|
signatureUtils |
SignatureUtils |
account |
NvmAccount |
eip712Data? |
Eip712Data |
Promise
<string
>
src/nevermined/utils/JwtUtils.ts:19
▸ setAudience(audience
): this
Set “aud” (Audience) Claim.
Name | Type | Description |
---|---|---|
audience |
string | string [] |
“aud” (Audience) Claim value to set on the JWT Claims Set. |
this
SignJWT.setAudience
node_modules/jose/dist/types/jwt/produce.d.ts:24
▸ setExpirationTime(input
): this
Set “exp” (Expiration Time) Claim.
Name | Type | Description |
---|---|---|
input |
string | 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. |
this
SignJWT.setExpirationTime
node_modules/jose/dist/types/jwt/produce.d.ts:46
▸ setIssuedAt(input?
): this
Set “iat” (Issued At) Claim.
Name | Type | Description |
---|---|---|
input? |
number |
“iat” (Issued At) Claim value to set on the JWT Claims Set. Default is current timestamp. |
this
SignJWT.setIssuedAt
node_modules/jose/dist/types/jwt/produce.d.ts:53
▸ setIssuer(issuer
): this
Set “iss” (Issuer) Claim.
Name | Type | Description |
---|---|---|
issuer |
string |
“Issuer” Claim value to set on the JWT Claims Set. |
this
SignJWT.setIssuer
node_modules/jose/dist/types/jwt/produce.d.ts:12
▸ setJti(jwtId
): this
Set “jti” (JWT ID) Claim.
Name | Type | Description |
---|---|---|
jwtId |
string |
“jti” (JWT ID) Claim value to set on the JWT Claims Set. |
this
SignJWT.setJti
node_modules/jose/dist/types/jwt/produce.d.ts:30
▸ setNotBefore(input
): this
Set “nbf” (Not Before) Claim.
Name | Type | Description |
---|---|---|
input |
string | 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. |
this
SignJWT.setNotBefore
node_modules/jose/dist/types/jwt/produce.d.ts:38
▸ setProtectedHeader(protectedHeader
): EthSignJWT
Name | Type |
---|---|
protectedHeader |
JWSHeaderParameters |
SignJWT.setProtectedHeader
src/nevermined/utils/JwtUtils.ts:14
▸ setSubject(subject
): this
Set “sub” (Subject) Claim.
Name | Type | Description |
---|---|---|
subject |
string |
“sub” (Subject) Claim value to set on the JWT Claims Set. |
this
SignJWT.setSubject
node_modules/jose/dist/types/jwt/produce.d.ts:18
▸ sign(key
, options?
): Promise
<string
>
Signs and returns the JWT.
Name | Type | Description |
---|---|---|
key |
Uint8Array | KeyLike |
Private Key or Secret to sign the JWT with. See Algorithm Key Requirements. |
options? |
SignOptions |
JWT Sign options. |
Promise
<string
>
SignJWT.sign
node_modules/jose/dist/types/jwt/sign.d.ts:22
▸ signText(text
, account
): Promise
<undefined
| string
>
Name | Type |
---|---|
text |
string | Uint8Array |
account |
Account |
Promise
<undefined
| string
>