Skip to content
Browse Gluu Flex 5.16.0

Webhooks


tags:

  • administration
  • admin-ui
  • webhooks

Gluu Flex Admin UI serves as a powerful web interface designed to streamline the management and configuration of the Janssen Authentication Server. To further extend its capabilities, Gluu Flex Admin UI integrates the use of webhooks, enabling the execution of custom business logic during the creation, update, and deletion of information on the Janssen Authentication Server. The seamless integration of webhooks into this interface enhances its functionality, offering a dynamic and extensible solution.

Webhooks are a mechanism for automating workflows by allowing external systems to be notified of specific events. In the context of Gluu Flex Admin UI, webhooks can be mapped to various Admin UI features to execute custom business logic when events associated with those features occur. Administrators can map one or more webhooks to specific feature events using the user interface.

#Webhook management on the UI

The webhook create/update form consists of the following fields.

FieldDescriptionRequired
Webhook IdThe unique identifier of webhookYes. Generated by Admin UI
Webhook NameThe name give to webhookYes
URLThe webhook urlYes
HTTP MethodThe type HTTP request (e.g. GET, POST, PUT, PATCH, DELETE )Yes
DescriptionWebhook descriptionNo
Webhook HeadersThe HTTP request headersNo
Request BodyThe HTTP request bodyMandatory for POST, PUT, PATCH requests
EnabledToggle switch to enable/disable webhookYes
Admin UI FeaturesThe Admin UI features which can be mapped to the webhookNo

image

Once a webhook is created it can be searched, edited or deleted.

image

#Shortcodes

When working with webhooks, shortcodes play a crucial role in dynamically injecting data into URLs and request bodies. They allow for flexible and customizable communication between different systems. Shortcode is denoted by curly braces ${}.

  • Using shortcodes in webhook url: Shortcodes can be used in path parameters or query parameters of webhook url.
https://example.com/webhook/${inum}/update
https://example.com/webhook?action=${action}&user_id=${userId}
  • Using shortcodes in webhook request-body: Webhook request bodies can utilize placeholders to dynamically populate data sent to the recipient system.
{
  "username": "${username}",
  "email": "${email}",
  "password": "${password}"
}

image

#Triggering webhooks

The webhooks can be mapped with one or more Admin UI feature(s) using the webhook create/update form. The following Admin UI features can be mapped to the webhooks.

When the feature action is performed (e.g. submitting the "create new user" form), the Admin UI displays the consent dialog with a list of webhooks that will be triggered upon the successful execution of the event. If the user clicks on the Accept button, all the enabled webhooks will be triggered during the event execution. The Admin UI is unable to proceed with event execution if any webhook fails during the process.

image

We use analytics cookies to measure which pages are useful, so we can improve them. They are only set if you accept. Essential cookies needed for the site to work are always on. See our privacy policy.