public class AddNameIdentifierToSubjects extends AbstractProfileAction
NameIdentifier
and adds it to the Subject
of all the statements
in all the assertions found via a lookup strategy, by default from the outbound message context.
No assertions or statements will be created by this action, but if no Subject
exists in
the statements found, it will be created.
The source of the NameIdentifier
is one of a set of candidate SAML1NameIdentifierGenerator
plugins injected into the action. The plugin(s) to attempt to use are derived from the Format value,
which is established by a lookup strategy.
Constructor and Description |
---|
AddNameIdentifierToSubjects()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doExecute(ProfileRequestContext profileRequestContext)
Performs this action.
|
protected void |
doInitialize() |
protected boolean |
doPreExecute(ProfileRequestContext profileRequestContext)
Called prior to execution, actions may override this method to perform pre-processing for a request.
|
void |
setAssertionsLookupStrategy(com.google.common.base.Function<ProfileRequestContext,List<Assertion>> strategy)
Set the strategy used to locate the
Assertion s to operate on. |
void |
setFormatLookupStrategy(com.google.common.base.Function<ProfileRequestContext,List<String>> strategy)
Set the strategy function to use to obtain the formats to try.
|
void |
setNameIdentifierGenerator(SAML1NameIdentifierGenerator theGenerator)
Set the generator to use.
|
void |
setOverwriteExisting(boolean flag)
Set whether to overwrite any existing
NameIdentifier objects found. |
doPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponse
destroy, doDestroy, initialize, isDestroyed, isInitialized
public void setOverwriteExisting(boolean flag)
NameIdentifier
objects found.flag
- true iff the action should overwrite any existing objectspublic void setAssertionsLookupStrategy(@Nonnull com.google.common.base.Function<ProfileRequestContext,List<Assertion>> strategy)
Assertion
s to operate on.strategy
- lookup strategypublic void setFormatLookupStrategy(@Nonnull com.google.common.base.Function<ProfileRequestContext,List<String>> strategy)
strategy
- format lookup strategypublic void setNameIdentifierGenerator(@Nonnull SAML1NameIdentifierGenerator theGenerator)
theGenerator
- the generator to useprotected void doInitialize() throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
doInitialize
in class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
net.shibboleth.utilities.java.support.component.ComponentInitializationException
protected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext)
If false is returned, execution will not proceed, and the action should attach an
EventContext
to the context tree to signal how to continue with overall
workflow processing.
If returning successfully, the last step should be to return the result of the superclass version of this method.
doPreExecute
in class AbstractProfileAction
profileRequestContext
- the current IdP profile request contextprotected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)
doExecute
in class AbstractProfileAction
profileRequestContext
- the current IdP profile request contextCopyright © 2018. All rights reserved.