Filter procedures

Filter procedures can be used to filter items from collections. The type of the filter-procedure determines on what kind of items the filter can be applied on.

A filter procedure has the following structure:

Listing 210 Structure of filter procedure
function result(filterContext) {
  // use the context to get the item information and access to other useful facilities
  return true; // return true to keep the item, false to remove it


The main function of a filter procedure must be called result.


The result function takes one argument, which is the context of the filter.

The type of the context depends on the type of the filter-procedure (shown on the next sections).


The main function of a filter procedure

  • filterContext – The provider context to operate on.

a boolean where true means keep the current item, false means exclude the current item.

Common API

Filter procedures have access to all of the Common Procedure API.


The following filter-procedure types are supported:

Examples of filter procedures can be found in the $INSTALL_DIR/examples/configs/filter-procedures directory.

Authenticator filter-procedure API

Filter procedures of type authenticator can be used in Service Providers and OAuth Client Configuration to filter authenticators.

Their context objects have type AuthenticatorFilterProcedureContext.

They can access information about the authenticator via the authenticator property of context.

Some of the authenticator object properties are listed below:

  • id: The ID of the authenticator.
  • default: whether this is the default authenticator.
  • acr: ACR of the authenticator.
  • description: A description of the authenticator.
  • url: The URL of the authenticator.
  • type: The type of the authenticator.