Class AddProxyRestrictionToAssertions
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.profile.action.AbstractProfileAction
org.opensaml.profile.action.AbstractConditionalProfileAction
org.opensaml.saml.saml2.profile.impl.AddProxyRestrictionToAssertions
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction
Action adds an
ProxyRestriction to every Assertion contained in a SAML 2
response, with the audiences and count obtained from a lookup function. If the containing
Conditions is not present, it will be created.-
Field Summary
FieldsModifier and TypeFieldDescriptionAudiences to add.private final org.slf4j.LoggerClass logger.private IntegerProxyCount to add.Strategy used to obtain the material to add.private ResponseResponse to modify.private Function<ProfileRequestContext,Response> Strategy used to locate the Response to operate on. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddProxyRestriction(ProfileRequestContext profileRequestContext, Conditions conditions) Add the audiences obtained from a lookup function to theProxyRestriction.protected voiddoExecute(ProfileRequestContext profileRequestContext) protected voidprotected booleandoPreExecute(ProfileRequestContext profileRequestContext) private ProxyRestrictiongetProxyRestriction(Conditions conditions) Get theProxyRestrictionto which audiences will be added.voidsetProxyRestrictionLookupStrategy(Function<ProfileRequestContext, Pair<Integer, Set<String>>> strategy) Set the strategy used to obtain the proxy restrictions to apply.voidSet the strategy used to locate the Response to operate on.Methods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction
getActivationCondition, setActivationConditionMethods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, doPostExecute, ensureHttpServletRequest, ensureHttpServletResponse, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, isPreExecuteCalled, setHttpServletRequestSupplier, setHttpServletResponseSupplierMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.InitializableComponent
initialize, isInitialized
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
responseLookupStrategy
Strategy used to locate the Response to operate on. -
proxyRestrictionLookupStrategy
@NonnullAfterInit private Function<ProfileRequestContext,Pair<Integer, proxyRestrictionLookupStrategySet<String>>> Strategy used to obtain the material to add. -
response
Response to modify. -
proxyCount
ProxyCount to add. -
audiences
Audiences to add.
-
-
Constructor Details
-
AddProxyRestrictionToAssertions
public AddProxyRestrictionToAssertions()Constructor.
-
-
Method Details
-
setResponseLookupStrategy
Set the strategy used to locate the Response to operate on.- Parameters:
strategy- lookup strategy
-
setProxyRestrictionLookupStrategy
public void setProxyRestrictionLookupStrategy(@Nonnull Function<ProfileRequestContext, Pair<Integer, Set<String>>> strategy) Set the strategy used to obtain the proxy restrictions to apply.- Parameters:
strategy- lookup strategy
-
doInitialize
- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
doPreExecute
- Overrides:
doPreExecutein classAbstractConditionalProfileAction
-
doExecute
- Overrides:
doExecutein classAbstractProfileAction
-
addProxyRestriction
private void addProxyRestriction(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull Conditions conditions) Add the audiences obtained from a lookup function to theProxyRestriction. If noProxyRestrictionexists on the givenConditionsone is created and added.- Parameters:
profileRequestContext- current profile request contextconditions- condition that has, or will receive the created,ProxyRestriction
-
getProxyRestriction
Get theProxyRestrictionto which audiences will be added.- Parameters:
conditions- existing set of conditions- Returns:
- the condition to which audiences will be added
-