Request Acknowledgement

The Request Acknowledgement authentication action allows to display a message to notify the user or ask them something. For example, one could ask the user to accept or decline terms and conditions to use a service.

The user is presented with an Accept button and with an optional Cancel button. The response can then be stored in a configurable attribute which can be used by other actions in the authentication pipeline:

  • The Accept button will send the boolean value true
  • The Cancel button will send the boolean value false

This authentication action has two modes to decide when the acknowledgement is requested:

  • Always: the acknowledgement request is always displayed.
  • Attribute Condition: the acknowledgement request is displayed, if and only if the configured attribute is not found in the attributes source (independently of the attribute value).

The Attribute Condition mode can be used to display the acknowledgement request only once to a given user if the response is persisted into a database in another authentication action.

Localization

The acknowledgement request message, the Accept button and Cancel button labels are customizable in various ways :

  • When configuring the action, you can provide your own: * message and button labels, * message keys whose values are stored in messages files to benefit from localization.
  • Update the default message and button labels for this action using message key overrides.

The default messages can be overridden using one of the following keys:

  • authentication-action.request-acknowledgement.view.accept: the Accept button label
  • authentication-action.request-acknowledgement.view.cancel: the Cancel button label

See Localizing Resources about how to override the default messages.

Configuration

The following configuration options are available:

Configuration Mandatory Description
message yes The acknowledgement message to display to the user: either a message key or a literal message
accept-button-label no The label displayed on the button to accept the message: either a message key or a literal message. Defaults to: authentication-action.request-acknowledgement.view.accept, which produces OK when using english locale.
cancel-button-label no The label displayed on the button to cancel or decline the message: either a message key or a literal message. Defaults to: authentication-action.request-acknowledgement.view.cancel, which produces Cancel when using english locale.
cancellable yes When true, a Cancel button is displayed, otherwise only the accept button is shown. Defaults to: true
user-response-attribute no When present, an attribute is created to store the user response in a chosen location.
user-response-attribute/name yes The attribute’s name storing the user response as a boolean value
user-response-attribute/location yes The attribute’s location in which to store the user response: Subject attributes, Context attributes, Action attributes
always no The acknowledgement is always requested
attribute-condition no The acknowledgement is requested only if an attribute is present in the attributes location
attribute-condition/name yes The attribute’s name that determines whether user acknowledgement is requested. If the attribute is present, the user already responded to the acknowledgement and it is not requested anymore. Otherwise the user response is requested.
attribute-condition/location yes Location to search for the attribute that determines whether acknowledgement is needed.

Note that either always or attribute-condition must be specified.