Class DefaultComputeAuthorizationCodeHashFunction
- 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.plugin.oidc.op.profile.context.navigate.DefaultComputeAuthorizationCodeHashFunction
-
- All Implemented Interfaces:
Function<ProfileRequestContext,String>,Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent,ContextDataLookupFunction<ProfileRequestContext,String>
public class DefaultComputeAuthorizationCodeHashFunction extends AbstractIdentifiableInitializableComponent implements ContextDataLookupFunction<ProfileRequestContext,String>
A function that computes a hash value for the authorization code via required configurable lookup function. The signature signing algorithm found in theSecurityParametersContextis used for calculating the hash. The lookup function for the security parameters context is required to be set.- Since:
- 3.2.0
-
-
Field Summary
Fields Modifier and Type Field Description private Function<ProfileRequestContext,String>authorizationCodeLookupStrategyStrategy used to locate the raw authorization code value (asString) to use for calculating the hash.private org.slf4j.LoggerlogClass logger.private Function<ProfileRequestContext,SecurityParametersContext>securityParametersLookupStrategyStrategy used to locate theSecurityParametersContextto use for calculating the code hash.
-
Constructor Summary
Constructors Constructor Description DefaultComputeAuthorizationCodeHashFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringapply(ProfileRequestContext input)protected voiddoInitialize()voidsetAuthorizationCodeLookupStrategy(Function<ProfileRequestContext,String> strategy)Set the strategy used to locate the authorization code value.voidsetSecurityParametersLookupStrategy(Function<ProfileRequestContext,SecurityParametersContext> strategy)Set the strategy used to locate theSecurityParametersContextto use.-
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
-
Methods inherited from interface net.shibboleth.utilities.java.support.component.IdentifiedComponent
getId
-
-
-
-
Field Detail
-
log
@Nonnull private org.slf4j.Logger log
Class logger.
-
securityParametersLookupStrategy
@NonnullAfterInit private Function<ProfileRequestContext,SecurityParametersContext> securityParametersLookupStrategy
Strategy used to locate theSecurityParametersContextto use for calculating the code hash.
-
authorizationCodeLookupStrategy
@NonnullAfterInit private Function<ProfileRequestContext,String> authorizationCodeLookupStrategy
Strategy used to locate the raw authorization code value (asString) to use for calculating the hash.
-
-
Method Detail
-
setSecurityParametersLookupStrategy
public void setSecurityParametersLookupStrategy(@Nonnull Function<ProfileRequestContext,SecurityParametersContext> strategy)Set the strategy used to locate theSecurityParametersContextto use.- Parameters:
strategy- lookup strategy
-
setAuthorizationCodeLookupStrategy
public void setAuthorizationCodeLookupStrategy(@Nonnull Function<ProfileRequestContext,String> strategy)Set the strategy used to locate the authorization code value.- Parameters:
strategy- lookup strategy
-
doInitialize
protected void doInitialize() throws ComponentInitializationException- Overrides:
doInitializein classAbstractIdentifiedInitializableComponent- Throws:
ComponentInitializationException
-
apply
@Nullable public String apply(@Nullable ProfileRequestContext input)
- Specified by:
applyin interfaceFunction<ProfileRequestContext,String>
-
-