Class BaseHttpOIDCRequestDecoder
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.messaging.decoder.AbstractMessageDecoder
org.opensaml.messaging.decoder.servlet.AbstractHttpServletRequestMessageDecoder
net.shibboleth.oidc.profile.decoding.impl.BaseHttpOIDCRequestDecoder
- All Implemented Interfaces:
OIDCMessageDecoder,Component,DestructableComponent,InitializableComponent,UnmodifiableComponent,MessageDecoder,HttpServletRequestMessageDecoder
- Direct Known Subclasses:
HTTPPostAuthnResponseDecoder,HTTPRedirectAuthnResponseDecoder
public abstract class BaseHttpOIDCRequestDecoder
extends AbstractHttpServletRequestMessageDecoder
implements OIDCMessageDecoder
A base class for OpenID Connect request decoders.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Function<MessageContext,Boolean> A strategy function to run after decoding.private booleanA flag to indicate whether a failure in the post decode strategy should be treated as an error.Fields inherited from class org.opensaml.messaging.decoder.AbstractMessageDecoder
BASE_PROTOCOL_MESSAGE_LOGGER_CATEGORY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoDecode()protected abstract voidPerforms the decoding logic.protected StringserializeMessageForLogging(Object message) voidsetPostDecodeStrategy(Function<MessageContext, Boolean> strategy) Set the post decode strategy function.voidsetPostDecodeStrategyFailureIsError(boolean flag) Set a flag to indicate whether a failure in the post decode strategy should be treated as an error.Methods inherited from class org.opensaml.messaging.decoder.servlet.AbstractHttpServletRequestMessageDecoder
doInitialize, getHttpServletRequest, getHttpServletRequestSupplier, setHttpServletRequestSupplierMethods inherited from class org.opensaml.messaging.decoder.AbstractMessageDecoder
decode, getMessageContext, getMessageToLog, getProtocolMessageLogger, getProtocolMessageLoggerSubCategory, logDecodedMessage, setMessageContext, setProtocolMessageLoggerSubCategoryMethods 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 net.shibboleth.shared.component.DestructableComponent
destroy, isDestroyedMethods inherited from interface net.shibboleth.shared.component.InitializableComponent
initialize, isInitializedMethods inherited from interface org.opensaml.messaging.decoder.MessageDecoder
decode, getMessageContext
-
Field Details
-
postDecodeStrategyFailureIsError
private boolean postDecodeStrategyFailureIsErrorA flag to indicate whether a failure in the post decode strategy should be treated as an error. -
postDecodeStrategy
A strategy function to run after decoding. Returns success as true and failure as false.
-
-
Constructor Details
-
BaseHttpOIDCRequestDecoder
protected BaseHttpOIDCRequestDecoder()Constructor.
-
-
Method Details
-
setPostDecodeStrategyFailureIsError
public void setPostDecodeStrategyFailureIsError(boolean flag) Set a flag to indicate whether a failure in the post decode strategy should be treated as an error.- Parameters:
flag- the flag to set.
-
setPostDecodeStrategy
Set the post decode strategy function.- Parameters:
strategy- The postDecodeStrategy to set.
-
doDecode
- Specified by:
doDecodein classAbstractMessageDecoder- Throws:
MessageDecodingException
-
performDecode
Performs the decoding logic. By the time this is called, this decoder has already been initialized and checked to ensure that it has not been destroyed.- Throws:
MessageDecodingException- thrown if there is a problem decoding the message
-
serializeMessageForLogging
- Overrides:
serializeMessageForLoggingin classAbstractMessageDecoder
-