Class 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 Details

    • postDecodeStrategyFailureIsError

      private boolean postDecodeStrategyFailureIsError
      A flag to indicate whether a failure in the post decode strategy should be treated as an error.
    • postDecodeStrategy

      @Nonnull private Function<MessageContext,Boolean> 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

      public void setPostDecodeStrategy(@Nonnull Function<MessageContext,Boolean> strategy)
      Set the post decode strategy function.
      Parameters:
      strategy - The postDecodeStrategy to set.
    • doDecode

      protected void doDecode() throws MessageDecodingException
      Specified by:
      doDecode in class AbstractMessageDecoder
      Throws:
      MessageDecodingException
    • performDecode

      protected abstract void performDecode() throws MessageDecodingException
      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

      @Nullable protected String serializeMessageForLogging(@Nullable Object message)
      Overrides:
      serializeMessageForLogging in class AbstractMessageDecoder