public class ScriptedTrustedNamesFunction extends java.lang.Object implements com.google.common.base.Function<XMLObject,java.util.Set<java.lang.String>>
Function which can be injected into
SignatureValidationFilter.setDynamicTrustedNamesStrategy(Function).| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_ENGINE
The default language is JavaScript.
|
private org.slf4j.Logger |
log
Class logger.
|
private java.lang.String |
logPrefix
Debugging info.
|
private net.shibboleth.utilities.java.support.scripting.EvaluableScript |
script
The script we care about.
|
| Modifier | Constructor and Description |
|---|---|
protected |
ScriptedTrustedNamesFunction(net.shibboleth.utilities.java.support.scripting.EvaluableScript theScript)
Constructor.
|
protected |
ScriptedTrustedNamesFunction(net.shibboleth.utilities.java.support.scripting.EvaluableScript theScript,
java.lang.String extraInfo)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<java.lang.String> |
apply(XMLObject context) |
(package private) static ScriptedTrustedNamesFunction |
inlineScript(java.lang.String scriptSource)
Factory to create
ScriptedTrustedNamesFunction for SignatureValidationFilters from inline data. |
(package private) static ScriptedTrustedNamesFunction |
inlineScript(java.lang.String engineName,
java.lang.String scriptSource)
Factory to create
ScriptedTrustedNamesFunction for SignatureValidationFilters from inline data. |
(package private) static ScriptedTrustedNamesFunction |
resourceScript(net.shibboleth.utilities.java.support.resource.Resource resource)
Factory to create
ScriptedTrustedNamesFunction from a Resource. |
(package private) static ScriptedTrustedNamesFunction |
resourceScript(java.lang.String engineName,
net.shibboleth.utilities.java.support.resource.Resource resource)
|
@Nonnull @NotEmpty public static final java.lang.String DEFAULT_ENGINE
@Nonnull private final org.slf4j.Logger log
@Nonnull private final net.shibboleth.utilities.java.support.scripting.EvaluableScript script
@Nullable private final java.lang.String logPrefix
protected ScriptedTrustedNamesFunction(@Nonnull
net.shibboleth.utilities.java.support.scripting.EvaluableScript theScript,
@Nullable
java.lang.String extraInfo)
theScript - the script we will evaluate.extraInfo - debugging information.protected ScriptedTrustedNamesFunction(@Nonnull
net.shibboleth.utilities.java.support.scripting.EvaluableScript theScript)
theScript - the script we will evaluate.public java.util.Set<java.lang.String> apply(@Nullable
XMLObject context)
apply in interface com.google.common.base.Function<XMLObject,java.util.Set<java.lang.String>>@Nonnull static ScriptedTrustedNamesFunction resourceScript(@Nonnull @NotEmpty java.lang.String engineName, @Nonnull net.shibboleth.utilities.java.support.resource.Resource resource) throws javax.script.ScriptException, java.io.IOException
engineName - the languageresource - the resource to look atjavax.script.ScriptException - if the compile failsjava.io.IOException - if the file doesn't exist.@Nonnull static ScriptedTrustedNamesFunction resourceScript(@Nonnull net.shibboleth.utilities.java.support.resource.Resource resource) throws javax.script.ScriptException, java.io.IOException
ScriptedTrustedNamesFunction from a Resource.resource - the resource to look atjavax.script.ScriptException - if the compile failsjava.io.IOException - if the file doesn't exist.@Nonnull static ScriptedTrustedNamesFunction inlineScript(@Nonnull @NotEmpty java.lang.String engineName, @Nonnull @NotEmpty java.lang.String scriptSource) throws javax.script.ScriptException
ScriptedTrustedNamesFunction for SignatureValidationFilters from inline data.scriptSource - the script, as a stringengineName - the languagejavax.script.ScriptException - if the compile fails@Nonnull static ScriptedTrustedNamesFunction inlineScript(@Nonnull @NotEmpty java.lang.String scriptSource) throws javax.script.ScriptException
ScriptedTrustedNamesFunction for SignatureValidationFilters from inline data.scriptSource - the script, as a stringjavax.script.ScriptException - if the compile fails