API Gateway Authentication Extension icon

API Gateway Authentication Extension

(1 review)


Event Authentication Extension

The Event Authentication extension for Mule 4 enables policies to easily update the authentication data of the Mule Event to propagate information using the flow pipeline.

A common use case for this scenario is applying a OAuth policy with a Rate Limiting SLA Based policy. In this use case, the first policy validates a token provided in the request. If the token is valid, the client ID is retrieved from the provider and saved in the Event authentication object. This authentication data is then used by the Rate Limiting policy to verify that the client application corresponding to the client credential has not reached its quota limit.



http://www.mulesoft.org/schema/mule/authentication http://www.mulesoft.org/schema/mule/authentication/current/mule-authentication.xsd">


  • Set authentication
  • Add properties

Set Authentication

This operation sets new authentication information to the Mule event. The opeation overwrites any existing authentication data.

  • principal (Optional)

A string that is used to store the identity of a subject in an authentication process, for example, a username or a client ID attribute.

If not specified, a null value is stored in the parameter.

  • credentials (Optional)

A string that is used to store the verification data of a subject in an authentication process, for example, a password or a client secret attribute.

If not specified, the parameter defaults to an empty string.

  • properties (Optional)

A DataWeave 2.0 expression that resolves to a Map of properties to be set to the authentication object.


<authentication:set-authentication principal="Principal" credentials="Skinner"
                                           'FirstProperty': 'FirstPropertyValue',
                                           'SecondProperty': 'SecondPropertyValue'

Add Properties

This operation adds properties to the current Authentication object of the Mule Event. If a match is found, the properties are overwritten. If does not already exist, the Authentication object is created with the specified properties, empty credentials, and a null principal.

  • newProperties (Optional)

A DataWeave 2.0 expression that resolves to a Map of properties to be added to the Authentication object. If not specified, no operation is performed.


<authentication:add-properties newProperties="#[

                                           'FirstProperty': 'FirstPropertyValue',
                                           'SecondProperty': 'SecondPropertyValue'



API Gateway Authentication Extension doesn't have any reviews yet
Dependency Snippets
Opens dependency snippets modal
Created byMuleSoft Organization
Published onJul 26, 2019
Asset overview

Asset versions for 1.0.x

VersionRuntime versionActions