Class AbstractEncryptTokenAction
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- org.opensaml.profile.action.AbstractProfileAction
-
- org.opensaml.profile.action.AbstractConditionalProfileAction
-
- net.shibboleth.idp.profile.AbstractProfileAction
-
- net.shibboleth.idp.plugin.oidc.op.profile.impl.AbstractOIDCResponseAction
-
- net.shibboleth.idp.plugin.oidc.op.oauth2.profile.impl.AbstractEncryptTokenAction
-
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
- Direct Known Subclasses:
EncryptAccessToken,EncryptProcessedToken
public abstract class AbstractEncryptTokenAction extends AbstractOIDCResponseAction
Action that encrypts a source object into anEncryptedJWT.The existence of encryption parameters is used to decide whether the encryption should take place.
- Since:
- 3.1.0
-
-
Field Summary
Fields Modifier and Type Field Description private Function<ProfileRequestContext,EncryptionContext>encryptionContextLookupStrategyStrategy used to look up theEncryptionContextto store parameters in.private org.slf4j.LoggerlogClass logger.private EncryptionParametersparamsEncryption parameters for encrypting payload.
-
Constructor Summary
Constructors Constructor Description AbstractEncryptTokenAction()Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voiddoExecute(ProfileRequestContext profileRequestContext)protected booleandoPreExecute(ProfileRequestContext profileRequestContext)protected abstract com.nimbusds.jose.PayloadgetPayload(ProfileRequestContext profileRequestContext)Get the payload to encrypt.voidsetEncryptionContextLookupStrategy(Function<ProfileRequestContext,EncryptionContext> strategy)Set the strategy used to look up theEncryptionContextto set the flags for.protected abstract voidsetProcessedToken(ProfileRequestContext profileRequestContext, com.nimbusds.jwt.EncryptedJWT token)Store the resulting token.-
Methods inherited from class net.shibboleth.idp.plugin.oidc.op.profile.impl.AbstractOIDCResponseAction
getMetadataContext, getOidcResponseContext
-
Methods inherited from class net.shibboleth.idp.profile.AbstractProfileAction
doExecute, execute, getMessage, getMessage, getMessage, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategy
-
Methods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction
getActivationCondition, setActivationCondition
-
Methods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponse
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, doInitialize, 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.InitializableComponent
initialize, isInitialized
-
-
-
-
Field Detail
-
log
@Nonnull private org.slf4j.Logger log
Class logger.
-
encryptionContextLookupStrategy
@Nonnull private Function<ProfileRequestContext,EncryptionContext> encryptionContextLookupStrategy
Strategy used to look up theEncryptionContextto store parameters in.
-
params
@Nullable private EncryptionParameters params
Encryption parameters for encrypting payload.
-
-
Method Detail
-
setEncryptionContextLookupStrategy
public void setEncryptionContextLookupStrategy(@Nonnull Function<ProfileRequestContext,EncryptionContext> strategy)Set the strategy used to look up theEncryptionContextto set the flags for.- Parameters:
strategy- lookup strategy
-
doPreExecute
protected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext)- Overrides:
doPreExecutein classAbstractOIDCResponseAction
-
doExecute
protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)- Overrides:
doExecutein classAbstractProfileAction
-
getPayload
@Nonnull protected abstract com.nimbusds.jose.Payload getPayload(@Nonnull ProfileRequestContext profileRequestContext)Get the payload to encrypt.- Parameters:
profileRequestContext- profile request context- Returns:
- payload to encrypt
-
setProcessedToken
protected abstract void setProcessedToken(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull com.nimbusds.jwt.EncryptedJWT token)Store the resulting token.- Parameters:
profileRequestContext- profile request contexttoken- encrypted token
-
-