JWT(header: Object, payload: Object, signingKey: String, algorithm: String): String
Generate JWT with header, payload, and signature by specific algorithm.
Introduced in DataWeave version 2.6.0.
Parameters
| Name | Type | Description |
|---|---|---|
|
|
JWT header. |
|
|
JWT payload. |
|
|
RSA private key in PEM format. |
|
|
RSA algorithm, such as |
Example
Supply key as a JSON string containing an unencrypted RSA private key
with a modulus of at least 2048 bits. This example signs with RS384.
JWT(payload: Object, signingKey: String): String
Generate JWT with a payload, automatically generated header, and key signed with RS256.
Introduced in DataWeave version 2.6.0.
Parameters
| Name | Type | Description |
|---|---|---|
|
|
JWT payload. |
|
|
RSA private key in PEM format. |