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:
1 2 3 4
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 }
Important
The main function of a filter procedure must be called result.
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
a boolean where true means keep the current item, false means exclude the current item.
true
false
Filter procedures have access to all of the Common Procedure API.
The following filter-procedure types are supported:
authenticator - see Authenticator filter procedure
authenticator
Examples of filter procedures can be found in the $INSTALL_DIR/examples/configs/filter-procedures directory.
$INSTALL_DIR/examples/configs/filter-procedures
Filter procedures of type authenticator can be used in Service Providers and OAuth Client Configuration to filter authenticators.
Their context objects have type AuthenticatorFilterProcedureContext.
context
They can access information about the authenticator via the authenticator property of context.
Some of the authenticator object properties are listed below:
id
default
acr
description
url
type