public class AddProxyRestrictionToAssertions extends AbstractConditionalProfileAction
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.| Modifier and Type | Field and Description |
|---|---|
private Collection<String> |
audiences
Audiences to add.
|
private org.slf4j.Logger |
log
Class logger.
|
private com.google.common.base.Function<ProfileRequestContext,Collection<String>> |
proxyAudiencesLookupStrategy
Strategy used to obtain the audiences to add.
|
private com.google.common.base.Function<ProfileRequestContext,Long> |
proxyCountLookupStrategy
Strategy used to obtain the proxy count to add.
|
private Response |
response
Response to modify.
|
private com.google.common.base.Function<ProfileRequestContext,Response> |
responseLookupStrategy
Strategy used to locate the Response to operate on.
|
| Constructor and Description |
|---|
AddProxyRestrictionToAssertions()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
addProxyRestriction(ProfileRequestContext profileRequestContext,
Conditions conditions)
Add the audiences obtained from a lookup function to the
ProxyRestriction. |
protected void |
doExecute(ProfileRequestContext profileRequestContext) |
protected void |
doInitialize() |
protected boolean |
doPreExecute(ProfileRequestContext profileRequestContext) |
private ProxyRestriction |
getProxyRestriction(Conditions conditions)
Get the
ProxyRestriction to which audiences will be added. |
void |
setProxyAudiencesLookupStrategy(com.google.common.base.Function<ProfileRequestContext,Collection<String>> strategy)
Set the strategy used to obtain the proxy restrictions to apply.
|
void |
setProxyCountLookupStrategy(com.google.common.base.Function<ProfileRequestContext,Long> strategy)
Set the strategy used to obtain the proxy count to apply.
|
void |
setResponseLookupStrategy(com.google.common.base.Function<ProfileRequestContext,Response> strategy)
Set the strategy used to locate the Response to operate on.
|
getActivationCondition, setActivationConditiondoPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponsedestroy, doDestroy, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitialize, isInitialized@Nonnull private final org.slf4j.Logger log
@Nonnull private com.google.common.base.Function<ProfileRequestContext,Response> responseLookupStrategy
@Nullable private com.google.common.base.Function<ProfileRequestContext,Collection<String>> proxyAudiencesLookupStrategy
@Nullable private com.google.common.base.Function<ProfileRequestContext,Long> proxyCountLookupStrategy
@Nullable private Collection<String> audiences
public AddProxyRestrictionToAssertions()
public void setResponseLookupStrategy(@Nonnull com.google.common.base.Function<ProfileRequestContext,Response> strategy)
strategy - lookup strategypublic void setProxyAudiencesLookupStrategy(@Nonnull com.google.common.base.Function<ProfileRequestContext,Collection<String>> strategy)
strategy - lookup strategypublic void setProxyCountLookupStrategy(@Nonnull com.google.common.base.Function<ProfileRequestContext,Long> strategy)
strategy - lookup strategyprotected void doInitialize()
throws ComponentInitializationException
doInitialize in class AbstractInitializableComponentComponentInitializationExceptionprotected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext)
doPreExecute in class AbstractConditionalProfileActionprotected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)
doExecute in class AbstractProfileActionprivate void addProxyRestriction(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull Conditions conditions)
ProxyRestriction. If no
ProxyRestriction exists on the given Conditions one is created and added.profileRequestContext - current profile request contextconditions - condition that has, or will receive the created, ProxyRestriction@Nonnull private ProxyRestriction getProxyRestriction(@Nonnull Conditions conditions)
ProxyRestriction to which audiences will be added.conditions - existing set of conditionsCopyright © 1999–2019 Shibboleth Consortium. All rights reserved.