public class ScriptableFilter extends AbstractScriptableHeapObject<org.forgerock.http.protocol.Response> implements org.forgerock.http.Filter
AbstractScriptableHeapObject
plus :
context
- the associated request context
request
- the HTTP request
next
- the next handler in the filter chain.
Contains also easy access to attributes
from the AttributesContext
,
e.g: attributes.user = "jackson"
, instead of contexts.attributes.attributes.user = "jackson"
.
In the same way, it gives access to session
from the SessionContext
,
for example, you can use: session.put(...)
, instead of contexts.session.session.put(...)
.
Like Java based filters, scripts are free to choose whether or not they forward the request to the next handler or, instead, return a response immediately.
Modifier and Type | Class and Description |
---|---|
static class |
ScriptableFilter.Heaplet
Creates and initializes a scriptable filter in a heap environment.
|
AbstractScriptableHeapObject.AbstractScriptableHeaplet
Modifier and Type | Method and Description |
---|---|
org.forgerock.util.promise.Promise<org.forgerock.http.protocol.Response,org.forgerock.util.promise.NeverThrowsException> |
filter(org.forgerock.services.context.Context context,
org.forgerock.http.protocol.Request request,
org.forgerock.http.Handler next) |
runScript, setArgs, setClientHandler
public org.forgerock.util.promise.Promise<org.forgerock.http.protocol.Response,org.forgerock.util.promise.NeverThrowsException> filter(org.forgerock.services.context.Context context, org.forgerock.http.protocol.Request request, org.forgerock.http.Handler next)
filter
in interface org.forgerock.http.Filter
Copyright © 2025 Open Identity Platform Community. All rights reserved.