Class BasicRelyingPartyConfiguration
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.profile.relyingparty.BasicRelyingPartyConfiguration
- All Implemented Interfaces:
Predicate<ProfileRequestContext>,RelyingPartyConfiguration,Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent
public class BasicRelyingPartyConfiguration
extends AbstractIdentifiableInitializableComponent
implements RelyingPartyConfiguration, Predicate<ProfileRequestContext>
The configuration that applies to a peer with which the software is communicating.
The name "Relying Party" is historical and encompasses both sources and consumers of identity information.
- Since:
- 5.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Predicate<ProfileRequestContext>Predicate that must be true for this configuration to be active for a given request.private Predicate<ProfileRequestContext>Controls whether detailed information about errors should be exposed.private Function<ProfileRequestContext,String> Lookup function to supply issuer.Lookup function to supplyprofileConfigurationsproperty.Lookup function to supply securityConfiguration property. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetIssuer(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.voidsetActivationCondition(Predicate<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<ProfileRequestContext> condition) Set a condition to determine whether detailed information about errors should be exposed.voidSet the name to use when issuing messages to peers.voidSet a lookup strategy for the name to use when issuing messages to peers.voidSet the profile configurations for this relying party.voidsetProfileConfigurationsLookupStrategy(Function<ProfileRequestContext, Map<String, ProfileConfiguration>> strategy) Set a lookup strategy for theprofileConfigurationsproperty.voidsetResponderId(String issuer) Deprecated, for removal: This API element is subject to removal in a future version.voidDeprecated, for removal: This API element is subject to removal in a future version.voidsetSecurityConfiguration(SecurityConfiguration configuration) Sets the security configuration for this profile.voidsetSecurityConfigurationLookupStrategy(Function<ProfileRequestContext, SecurityConfiguration> strategy) Set a lookup strategy for the security configuration.booleantest(ProfileRequestContext input) Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
doInitialize, ensureId, getId, 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.IdentifiedComponent
getIdMethods inherited from interface net.shibboleth.shared.component.InitializableComponent
initialize, isInitialized
-
Field Details
-
issuerLookupStrategy
Lookup function to supply issuer. -
detailedErrorsPredicate
Controls whether detailed information about errors should be exposed. -
securityConfigurationLookupStrategy
@Nonnull private Function<ProfileRequestContext,SecurityConfiguration> securityConfigurationLookupStrategyLookup function to supply securityConfiguration property. -
profileConfigurationsLookupStrategy
@Nonnull private Function<ProfileRequestContext,Map<String, profileConfigurationsLookupStrategyProfileConfiguration>> Lookup function to supplyprofileConfigurationsproperty. -
activationCondition
Predicate that must be true for this configuration to be active for a given request.
-
-
Constructor Details
-
BasicRelyingPartyConfiguration
public BasicRelyingPartyConfiguration()Constructor.
-
-
Method Details
-
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
-
setIssuer
Set the name to use when issuing messages to peers.- Parameters:
issuer- name to set- Since:
- 5.0.0
-
setIssuerLookupStrategy
Set a lookup strategy for the name to use when issuing messages to peers.- Parameters:
strategy- lookup strategy- Since:
- 5.0.0
-
setResponderId
@Deprecated(since="5.0.0", forRemoval=true) public void setResponderId(@Nullable @NotEmpty String issuer) Deprecated, for removal: This API element is subject to removal in a future version.Legacy property setter for issuer.- Specified by:
setResponderIdin interfaceRelyingPartyConfiguration- Parameters:
issuer- the issuer to set
-
setResponderIdLookupStrategy
@Deprecated(since="5.0.0", forRemoval=true) public void setResponderIdLookupStrategy(@Nonnull Function<ProfileRequestContext, String> strategy) Deprecated, for removal: This API element is subject to removal in a future version.Set a lookup strategy for the issuer property.- Parameters:
strategy- lookup strategy
-
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
-
setDetailedErrors
public void setDetailedErrors(boolean flag) Set whether detailed information about errors should be exposed.- Parameters:
flag- flag to set
-
setDetailedErrorsPredicate
Set a condition to determine whether detailed information about errors should be exposed.- Parameters:
condition- condition to set
-
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
-
setSecurityConfiguration
Sets the security configuration for this profile.- Parameters:
configuration- security configuration for this profile- Since:
- 5.0.0
-
setSecurityConfigurationLookupStrategy
public void setSecurityConfigurationLookupStrategy(@Nonnull Function<ProfileRequestContext, SecurityConfiguration> strategy) Set a lookup strategy for the security configuration.- Parameters:
strategy- lookup strategy- Since:
- 5.0.0
-
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
@Nullable public ProfileConfiguration getProfileConfiguration(@Nullable 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 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
-
setProfileConfigurations
Set the profile configurations for this relying party.- Parameters:
configs- the configurations to set
-
setProfileConfigurationsLookupStrategy
public void setProfileConfigurationsLookupStrategy(@Nonnull Function<ProfileRequestContext, Map<String, ProfileConfiguration>> strategy) Set a lookup strategy for theprofileConfigurationsproperty.- Parameters:
strategy- lookup strategy- Since:
- 4.0.0
-
setActivationCondition
Set the condition under which the relying party configuration should be active.- Parameters:
condition- the activation condition
-
test
- Specified by:
testin interfacePredicate<ProfileRequestContext>
-