JSON Web Token Connector for Mule Runtime.

Additional Info

Requires Mule Enterprise License

No  

Requires Entitlement

No  

Mule Version

3.8.0 or higher

Configs


Configuration

<jwt:config>

Configuration

Attributes

Name Java Type Description Default Value Required

name

String

The name of this configuration. With this name can be later referenced.

x 

secret

String

Specifies a secret/public key for JWT encryption.

 

Processors


Decode JWT

<jwt:decode>

Decode JWT into a JsonData

XML Sample

<jwt:decode config-ref="" token="#[message.inboundProperties['Authorization']]" validateSignature="false"/>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

token

String

The JSON Web Token to decode

#[message.inboundProperties['Authorization']]

 

validateSignature

Boolean

If the JSON Web Token should be validated before decoded

false

 

Returns

Return Java Type Description

JsonData

A JSONObject containing the claims from the JSON Web Token payload

Filters


Signature is valid

<jwt:signature-is-valid>

Validates a JWT

XML Sample

<jwt:signature-is-valid config-ref="" token="#[message.inboundProperties['Authorization']]"/>

Attributes

Name Java Type Description Default Value Required

config-ref

String

Specify which config to use

x 

token

String

The JSON Web Token to validate

#[message.inboundProperties['Authorization']]

 

Returns

Return Java Type Description

boolean

true if the provide token has none or valid signature