Getting started Community Training Tutorials Documentation APIs, AI & Tools
%dw 2.0
import * from dw::util::jwt::RSA
output application/json
input key application/json
---
JWT({kid: "example"}, {sub: "test"}, key, "Sha384withRSA")
Generate JWT with header, payload, and signature by specific algorithm.
Introduced in DataWeave version 2.6.0.
| Name | Type | Description |
|---|---|---|
|
|
JWT header. |
|
|
JWT payload. |
|
|
RSA private key in PEM format. |
|
|
RSA algorithm, such as |
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.
Generate JWT with a payload, automatically generated header, and key signed with RS256.
Introduced in DataWeave version 2.6.0.
| Name | Type | Description |
|---|---|---|
|
|
JWT payload. |
|
|
RSA private key in PEM format. |