Class StorageServicePushedAuthorizationRequestUriSerializationFunction
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.idp.plugin.oidc.op.profile.logic.AbstractPushedAuthorizationRequestComponent
net.shibboleth.idp.plugin.oidc.op.profile.logic.StorageServicePushedAuthorizationRequestUriSerializationFunction
- All Implemented Interfaces:
BiFunction<ProfileRequestContext,,Map<String, Object>, URI> Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent
public class StorageServicePushedAuthorizationRequestUriSerializationFunction
extends AbstractPushedAuthorizationRequestComponent
implements BiFunction<ProfileRequestContext,Map<String,Object>,URI>
A serialization function for the request URI claims set within OAuth2 PAR. The claims set is stored in the
configured
StorageService with the token identifier.-
Field Summary
FieldsModifier and TypeFieldDescriptionStrategy used to locate theIdentifierGenerationStrategyto use.private DurationThe lifetime for the storage record.private final org.slf4j.LoggerClass logger.private com.fasterxml.jackson.databind.ObjectMapperObject mapper used for serializing the claims set.private StorageServiceStorage service used for storing the claims set on server-side.private booleanThe xmlSafe-flag passed to the identifier generator.Fields inherited from class net.shibboleth.idp.plugin.oidc.op.profile.logic.AbstractPushedAuthorizationRequestComponent
PAR_REQUEST_URI_PREFIX, PAR_REQUEST_URI_STORAGE_PREFIX, STORAGE_CONTEXT_NAME -
Constructor Summary
ConstructorsConstructorDescriptionConstructor. -
Method Summary
Modifier and TypeMethodDescriptionapply(ProfileRequestContext profileRequestContext, Map<String, Object> claimsSet) protected voidvoidsetIdentifierGeneratorLookupStrategy(Function<ProfileRequestContext, IdentifierGenerationStrategy> strategy) Set the strategy used to locate theIdentifierGenerationStrategyto use.voidsetLifetime(Duration duration) Set the lifetime for the storage record.voidsetObjectMapper(com.fasterxml.jackson.databind.ObjectMapper mapper) Set the object mapper used for serializing the claims set.voidsetStorageService(StorageService storage) Set theStorageServiceback-end to use.voidsetXmlSafeIdentifier(boolean flag) Set the xmlSafe-flag passed to the identifier generatorMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
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 java.util.function.BiFunction
andThenMethods inherited from interface net.shibboleth.shared.component.IdentifiedComponent
getId
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
objectMapper
Object mapper used for serializing the claims set. -
storageService
Storage service used for storing the claims set on server-side. -
idGeneratorLookupStrategy
@Nonnull private Function<ProfileRequestContext,IdentifierGenerationStrategy> idGeneratorLookupStrategyStrategy used to locate theIdentifierGenerationStrategyto use. -
xmlSafeIdentifier
private boolean xmlSafeIdentifierThe xmlSafe-flag passed to the identifier generator. -
lifetime
The lifetime for the storage record.
-
-
Constructor Details
-
StorageServicePushedAuthorizationRequestUriSerializationFunction
public StorageServicePushedAuthorizationRequestUriSerializationFunction()Constructor.
-
-
Method Details
-
setObjectMapper
public void setObjectMapper(@Nonnull com.fasterxml.jackson.databind.ObjectMapper mapper) Set the object mapper used for serializing the claims set.- Parameters:
mapper- What to set.
-
setStorageService
Set theStorageServiceback-end to use.- Parameters:
storage- the back-end to use
-
setLifetime
Set the lifetime for the storage record.- Parameters:
duration- What to set.
-
setXmlSafeIdentifier
public void setXmlSafeIdentifier(boolean flag) Set the xmlSafe-flag passed to the identifier generator- Parameters:
flag- xmlSafe-flag
-
setIdentifierGeneratorLookupStrategy
public void setIdentifierGeneratorLookupStrategy(@Nonnull Function<ProfileRequestContext, IdentifierGenerationStrategy> strategy) Set the strategy used to locate theIdentifierGenerationStrategyto use.- Parameters:
strategy- lookup strategy
-
doInitialize
- Overrides:
doInitializein classAbstractIdentifiedInitializableComponent- Throws:
ComponentInitializationException
-
apply
@Nullable public URI apply(@Nullable ProfileRequestContext profileRequestContext, @Nullable Map<String, Object> claimsSet) - Specified by:
applyin interfaceBiFunction<ProfileRequestContext,Map<String, Object>, URI>
-