Class DelegatingRelyingPartyConfiguration
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.profile.relyingparty.DelegatingRelyingPartyConfiguration
- All Implemented Interfaces:
Predicate<ProfileRequestContext>,RelyingPartyConfiguration,Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent
public class DelegatingRelyingPartyConfiguration
extends AbstractIdentifiableInitializableComponent
implements RelyingPartyConfiguration, Predicate<ProfileRequestContext>
Wrapper for
RelyingPartyConfiguration that will handle absent settings
by delegating to an injected parent instance of RelyingPartyConfiguration.- Since:
- 5.3.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanWhether to treat an empty profile configuration set as a valid outcome.private RelyingPartyConfigurationInheritance source.private RelyingPartyConfigurationDelegation target. -
Constructor Summary
ConstructorsConstructorDescriptionDelegatingRelyingPartyConfiguration(RelyingPartyConfiguration parent, RelyingPartyConfiguration config, boolean honorEmpty) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetId()getIssuer(ProfileRequestContext profileRequestContext) Get the name to use when issuing messages to peers.getProfileConfiguration(ProfileRequestContext profileRequestContext, String profileId) Get the profile configuration, for the relying party, for the given profile.getProfileConfigurations(ProfileRequestContext profileRequestContext) Get the unmodifiable set of profile configurations for this relying party.getSecurityConfiguration(ProfileRequestContext profileRequestContext) Get the defaultSecurityConfigurationto use.booleanisDetailedErrors(ProfileRequestContext profileRequestContext) Get whether detailed information about errors should be exposed.voidsetResponderId(String issuer) Legacy property setter for issuer.booleantest(ProfileRequestContext input) Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
doInitialize, ensureId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentExceptionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, 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
-
parentConfig
Inheritance source. -
relyingPartyConfiguration
Delegation target. -
honorEmptyProfileCollection
private boolean honorEmptyProfileCollectionWhether to treat an empty profile configuration set as a valid outcome.
-
-
Constructor Details
-
DelegatingRelyingPartyConfiguration
public DelegatingRelyingPartyConfiguration(@Nonnull RelyingPartyConfiguration parent, @Nonnull RelyingPartyConfiguration config, boolean honorEmpty) Constructor.- Parameters:
parent- inheritance sourceconfig- delegation targethonorEmpty- whether to treat empty profile configuration collection as legitimate
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceIdentifiedComponent- Overrides:
getIdin classAbstractIdentifiedInitializableComponent
-
test
- Specified by:
testin interfacePredicate<ProfileRequestContext>
-
setResponderId
Legacy property setter for issuer.- Specified by:
setResponderIdin interfaceRelyingPartyConfiguration- Parameters:
issuer- the issuer to set
-
getIssuer
Get the name to use when issuing messages to peers.In SAML this is an "entityID", in other protocols it may have other labels.
- Specified by:
getIssuerin interfaceRelyingPartyConfiguration- Parameters:
profileRequestContext- current profile request context- Returns:
- name to use when issuing messages
-
getSecurityConfiguration
@Nullable public SecurityConfiguration getSecurityConfiguration(@Nullable ProfileRequestContext profileRequestContext) Get the defaultSecurityConfigurationto use.- Specified by:
getSecurityConfigurationin interfaceRelyingPartyConfiguration- Parameters:
profileRequestContext- current profile request context- Returns:
- default security configuration
-
getProfileConfigurations
@Nonnull @Unmodifiable @NotLive public Map<String,ProfileConfiguration> getProfileConfigurations(@Nullable ProfileRequestContext profileRequestContext) Get the unmodifiable set of profile configurations for this relying party.- Specified by:
getProfileConfigurationsin interfaceRelyingPartyConfiguration- Parameters:
profileRequestContext- current profile request context- Returns:
- unmodifiable set of profile configurations for this relying party, never null
-
getProfileConfiguration
public ProfileConfiguration getProfileConfiguration(ProfileRequestContext profileRequestContext, 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 ofRelyingPartyConfiguration.getProfileConfigurations(ProfileRequestContext). This map contains no null entries, keys, or values.- Specified by:
getProfileConfigurationin interfaceRelyingPartyConfiguration- 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
-
isDetailedErrors
Get whether detailed information about errors should be exposed.- Specified by:
isDetailedErrorsin interfaceRelyingPartyConfiguration- Parameters:
profileRequestContext- current profile request context- Returns:
- true iff it is acceptable to expose detailed error information
-