Package net.shibboleth.idp.relyingparty
Class RelyingPartyConfiguration
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
-
- net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
-
- net.shibboleth.idp.relyingparty.RelyingPartyConfiguration
-
- All Implemented Interfaces:
Predicate<org.opensaml.profile.context.ProfileRequestContext>,net.shibboleth.utilities.java.support.component.Component,net.shibboleth.utilities.java.support.component.DestructableComponent,net.shibboleth.utilities.java.support.component.IdentifiableComponent,net.shibboleth.utilities.java.support.component.IdentifiedComponent,net.shibboleth.utilities.java.support.component.InitializableComponent
public class RelyingPartyConfiguration extends net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent implements net.shibboleth.utilities.java.support.component.IdentifiedComponent, Predicate<org.opensaml.profile.context.ProfileRequestContext>
The configuration that applies to a given relying party.
-
-
Field Summary
Fields Modifier and Type Field Description private Predicate<org.opensaml.profile.context.ProfileRequestContext>activationConditionPredicate that must be true for this configuration to be active for a given request.private Predicate<org.opensaml.profile.context.ProfileRequestContext>detailedErrorsPredicateControls whether detailed information about errors should be exposed.private org.slf4j.LoggerlogClass logger.private Function<org.opensaml.profile.context.ProfileRequestContext,Map<String,ProfileConfiguration>>profileConfigurationsLookupStrategyLookup function to supplyprofileConfigurationsproperty.private Function<org.opensaml.profile.context.ProfileRequestContext,String>responderIdLookupStrategyLookup function to supplyresponderIdproperty.
-
Constructor Summary
Constructors Constructor Description RelyingPartyConfiguration()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoInitialize()ProfileConfigurationgetProfileConfiguration(org.opensaml.profile.context.ProfileRequestContext profileRequestContext, String profileId)Get the profile configuration, for the relying party, for the given profile.Map<String,ProfileConfiguration>getProfileConfigurations(org.opensaml.profile.context.ProfileRequestContext profileRequestContext)Get the unmodifiable set of profile configurations for this relying party.StringgetResponderId(org.opensaml.profile.context.ProfileRequestContext profileRequestContext)Get the self-referential ID to use when responding to requests.booleanisDetailedErrors(org.opensaml.profile.context.ProfileRequestContext profileRequestContext)Get whether detailed information about errors should be exposed.voidsetActivationCondition(Predicate<org.opensaml.profile.context.ProfileRequestContext> condition)Set the condition under which the relying party configuration should be active.voidsetDetailedErrors(boolean flag)Set whether detailed information about errors should be exposed.voidsetDetailedErrorsPredicate(Predicate<org.opensaml.profile.context.ProfileRequestContext> condition)Set a condition to determine whether detailed information about errors should be exposed.voidsetProfileConfigurations(Collection<ProfileConfiguration> configs)Set the profile configurations for this relying party.voidsetProfileConfigurationsLookupStrategy(Function<org.opensaml.profile.context.ProfileRequestContext,Map<String,ProfileConfiguration>> strategy)Set a lookup strategy for theprofileConfigurationsproperty.voidsetResponderId(String responder)Set the self-referential ID to use when responding to messages.voidsetResponderIdLookupStrategy(Function<org.opensaml.profile.context.ProfileRequestContext,String> strategy)Set a lookup strategy for theresponderIdproperty.booleantest(org.opensaml.profile.context.ProfileRequestContext input)-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
setId
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
getId
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, initialize, isDestroyed, isInitialized
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Field Detail
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
responderIdLookupStrategy
@Nonnull private Function<org.opensaml.profile.context.ProfileRequestContext,String> responderIdLookupStrategy
Lookup function to supplyresponderIdproperty.
-
detailedErrorsPredicate
@Nonnull private Predicate<org.opensaml.profile.context.ProfileRequestContext> detailedErrorsPredicate
Controls whether detailed information about errors should be exposed.
-
profileConfigurationsLookupStrategy
@Nonnull private Function<org.opensaml.profile.context.ProfileRequestContext,Map<String,ProfileConfiguration>> profileConfigurationsLookupStrategy
Lookup function to supplyprofileConfigurationsproperty.
-
activationCondition
@Nonnull private Predicate<org.opensaml.profile.context.ProfileRequestContext> activationCondition
Predicate that must be true for this configuration to be active for a given request.
-
-
Method Detail
-
getResponderId
@Nonnull @NotEmpty public String getResponderId(@Nullable org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
Get the self-referential ID to use when responding to requests.- Parameters:
profileRequestContext- current profile request context- Returns:
- ID to use when responding
-
setResponderId
public void setResponderId(@Nonnull @NotEmpty String responder)Set the self-referential ID to use when responding to messages.- Parameters:
responder- ID to use when responding to messages
-
setResponderIdLookupStrategy
public void setResponderIdLookupStrategy(@Nonnull Function<org.opensaml.profile.context.ProfileRequestContext,String> strategy)Set a lookup strategy for theresponderIdproperty.- Parameters:
strategy- lookup strategy- Since:
- 3.4.0
-
isDetailedErrors
public boolean isDetailedErrors(@Nullable org.opensaml.profile.context.ProfileRequestContext profileRequestContext)Get whether detailed information about errors should be exposed.- Parameters:
profileRequestContext- current profile request context- Returns:
- true iff it is acceptable to expose detailed error information
-
setDetailedErrors
public void setDetailedErrors(boolean flag)
Set whether detailed information about errors should be exposed.- Parameters:
flag- flag to set
-
setDetailedErrorsPredicate
public void setDetailedErrorsPredicate(@Nonnull Predicate<org.opensaml.profile.context.ProfileRequestContext> condition)Set a condition to determine whether detailed information about errors should be exposed.- Parameters:
condition- condition to set
-
getProfileConfigurations
@Nonnull @NonnullElements @Unmodifiable @NotLive public Map<String,ProfileConfiguration> getProfileConfigurations(@Nullable org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
Get the unmodifiable set of profile configurations for this relying party.- Parameters:
profileRequestContext- current profile request context- Returns:
- unmodifiable set of profile configurations for this relying party, never null
-
getProfileConfiguration
@Nullable public ProfileConfiguration getProfileConfiguration(@Nullable org.opensaml.profile.context.ProfileRequestContext profileRequestContext, @Nullable String profileId)
Get the profile configuration, for the relying party, for the given profile. This is a convenience method and is equivalent to callingMap.get(Object)on the return ofgetProfileConfigurations(ProfileRequestContext). This map contains no null entries, keys, or values.- Parameters:
profileRequestContext- current profile request contextprofileId- the ID of the profile- Returns:
- the configuration for the profile or null if the profile ID was null or empty or there is no configuration for the given profile
-
setProfileConfigurations
public void setProfileConfigurations(@Nullable @NonnullElements Collection<ProfileConfiguration> configs)Set the profile configurations for this relying party.- Parameters:
configs- the configurations to set
-
setProfileConfigurationsLookupStrategy
public void setProfileConfigurationsLookupStrategy(@Nonnull Function<org.opensaml.profile.context.ProfileRequestContext,Map<String,ProfileConfiguration>> strategy)Set a lookup strategy for theprofileConfigurationsproperty.- Parameters:
strategy- lookup strategy- Since:
- 4.0.0
-
setActivationCondition
public void setActivationCondition(@Nonnull Predicate<org.opensaml.profile.context.ProfileRequestContext> condition)Set the condition under which the relying party configuration should be active.- Parameters:
condition- the activation condition
-
doInitialize
protected void doInitialize() throws net.shibboleth.utilities.java.support.component.ComponentInitializationException- Overrides:
doInitializein classnet.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent- Throws:
net.shibboleth.utilities.java.support.component.ComponentInitializationException
-
-