Class DiscoveryProfileRequestFunction
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.idp.authn.proxy.impl.DiscoveryProfileRequestFunction
- All Implemented Interfaces:
BiFunction<RequestContext,,ProfileRequestContext, String> Component,DestructableComponent,InitializableComponent
@ThreadSafe
public class DiscoveryProfileRequestFunction
extends AbstractInitializableComponent
implements BiFunction<RequestContext,ProfileRequestContext,String>
A
Function that produces a discovery request URL using the protocol defined in
https://wiki.oasis-open.org/security/IdpDiscoSvcProtonProfile
Since there is no upstream "relying party" yet, the identity of the system is derived from the currently in-effect entityID that will be used to respond to the downstream relying party.
-
Field Summary
FieldsModifier and TypeFieldDescriptionOverrides this function via an injected bean.private Function<ProfileRequestContext,String> Lookup strategy for determining the "base" discovery URL.private EscaperURL query parameter escaper.Lookup strategy for locatingRelyingPartyContext. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(RequestContext springRequestContext, ProfileRequestContext profileRequestContext) protected voidvoidSet a function to call in place of this built-in class to generate the request.voidSet the lookup strategy for the "base" discovery service URL to use.voidSet the lookup strategy for theRelyingPartyContext.Methods 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 java.util.function.BiFunction
andThen
-
Field Details
-
escaper
URL query parameter escaper. -
relyingPartyContextLookupStrategy
@Nonnull private Function<ProfileRequestContext,RelyingPartyContext> relyingPartyContextLookupStrategyLookup strategy for locatingRelyingPartyContext. -
discoveryURLLookupStrategy
Lookup strategy for determining the "base" discovery URL. -
delegatedRequestFunction
Overrides this function via an injected bean.
-
-
Constructor Details
-
DiscoveryProfileRequestFunction
public DiscoveryProfileRequestFunction()Constructor.
-
-
Method Details
-
setRelyingPartyContextLookupStrategy
public void setRelyingPartyContextLookupStrategy(@Nonnull Function<ProfileRequestContext, RelyingPartyContext> strategy) Set the lookup strategy for theRelyingPartyContext.- Parameters:
strategy- lookup strategy
-
setDiscoveryURLLookupStrategy
Set the lookup strategy for the "base" discovery service URL to use.- Parameters:
strategy- lookup strategy
-
setDelegatedRequestFunction
public void setDelegatedRequestFunction(@Nullable BiFunction<RequestContext, ProfileRequestContext, String> delegate) Set a function to call in place of this built-in class to generate the request.This is a mechanism to account for how this function gets used in the discovery flow.
- Parameters:
delegate- the function to delegate to- Since:
- 5.0.0
-
doInitialize
- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
apply
@Nullable public String apply(@Nullable RequestContext springRequestContext, @Nullable ProfileRequestContext profileRequestContext) - Specified by:
applyin interfaceBiFunction<RequestContext,ProfileRequestContext, String>
-