Class ScriptedTrustedNamesFunction
java.lang.Object
net.shibboleth.utilities.java.support.scripting.AbstractScriptEvaluator
org.opensaml.saml.metadata.resolver.filter.impl.ScriptedTrustedNamesFunction
public class ScriptedTrustedNamesFunction
extends AbstractScriptEvaluator
implements Function<XMLObject,Set<String>>
A scripted
Function
which can be injected into
SignatureValidationFilter.setDynamicTrustedNamesStrategy(Function)
.-
Field Summary
Fields inherited from class net.shibboleth.utilities.java.support.scripting.AbstractScriptEvaluator
DEFAULT_ENGINE
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ScriptedTrustedNamesFunction
(EvaluableScript theScript) Constructor.protected
ScriptedTrustedNamesFunction
(EvaluableScript theScript, String extraInfo) Constructor. -
Method Summary
Modifier and TypeMethodDescription(package private) static ScriptedTrustedNamesFunction
inlineScript
(String scriptSource) Factory to createScriptedTrustedNamesFunction
forSignatureValidationFilter
s from inline data.(package private) static ScriptedTrustedNamesFunction
inlineScript
(String engineName, String scriptSource) Factory to createScriptedTrustedNamesFunction
forSignatureValidationFilter
s from inline data.protected void
prepareContext
(ScriptContext scriptContext, Object... input) (package private) static ScriptedTrustedNamesFunction
resourceScript
(String engineName, Resource resource) (package private) static ScriptedTrustedNamesFunction
resourceScript
(Resource resource) Factory to createScriptedTrustedNamesFunction
from aResource
.Methods inherited from class net.shibboleth.utilities.java.support.scripting.AbstractScriptEvaluator
evaluate, finalizeContext, getHideExceptions, getLogPrefix, getOutputType, getReturnOnError, setCustomObject, setHideExceptions, setLogPrefix, setOutputType, setReturnOnError
-
Constructor Details
-
ScriptedTrustedNamesFunction
protected ScriptedTrustedNamesFunction(@Nonnull EvaluableScript theScript, @Nullable String extraInfo) Constructor.- Parameters:
theScript
- the script we will evaluate.extraInfo
- debugging information.
-
ScriptedTrustedNamesFunction
Constructor.- Parameters:
theScript
- the script we will evaluate.
-
-
Method Details
-
getCustomObject
- Overrides:
getCustomObject
in classAbstractScriptEvaluator
-
apply
-
prepareContext
- Specified by:
prepareContext
in classAbstractScriptEvaluator
-
resourceScript
@Nonnull static ScriptedTrustedNamesFunction resourceScript(@Nonnull @NotEmpty String engineName, @Nonnull Resource resource) throws ScriptException, IOException - Parameters:
engineName
- the languageresource
- the resource to look at- Returns:
- the function
- Throws:
ScriptException
- if the compile failsIOException
- if the file doesn't exist.
-
resourceScript
@Nonnull static ScriptedTrustedNamesFunction resourceScript(@Nonnull Resource resource) throws ScriptException, IOException Factory to createScriptedTrustedNamesFunction
from aResource
.- Parameters:
resource
- the resource to look at- Returns:
- the function
- Throws:
ScriptException
- if the compile failsIOException
- if the file doesn't exist.
-
inlineScript
@Nonnull static ScriptedTrustedNamesFunction inlineScript(@Nonnull @NotEmpty String engineName, @Nonnull @NotEmpty String scriptSource) throws ScriptException Factory to createScriptedTrustedNamesFunction
forSignatureValidationFilter
s from inline data.- Parameters:
scriptSource
- the script, as a stringengineName
- the language- Returns:
- the function
- Throws:
ScriptException
- if the compile fails
-
inlineScript
@Nonnull static ScriptedTrustedNamesFunction inlineScript(@Nonnull @NotEmpty String scriptSource) throws ScriptException Factory to createScriptedTrustedNamesFunction
forSignatureValidationFilter
s from inline data.- Parameters:
scriptSource
- the script, as a string- Returns:
- the function
- Throws:
ScriptException
- if the compile fails
-