Class AbstractPac4jDecoder

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.messaging.decoder.AbstractMessageDecoder
org.pac4j.saml.transport.AbstractPac4jDecoder
All Implemented Interfaces:
net.shibboleth.shared.component.Component, net.shibboleth.shared.component.DestructableComponent, net.shibboleth.shared.component.InitializableComponent, net.shibboleth.shared.component.UnmodifiableComponent, org.opensaml.messaging.decoder.MessageDecoder
Direct Known Subclasses:
Pac4jHTTPPostDecoder, Pac4jHTTPRedirectDeflateDecoder, SAML2ArtifactBindingDecoder

public abstract class AbstractPac4jDecoder extends org.opensaml.messaging.decoder.AbstractMessageDecoder
Common decoder.
Since:
3.4.0
Author:
Jerome Leleu
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final org.pac4j.core.context.CallContext
     
    protected net.shibboleth.shared.xml.ParserPool
    Parser pool used to deserialize the message.

    Fields inherited from class org.opensaml.messaging.decoder.AbstractMessageDecoder

    BASE_PROTOCOL_MESSAGE_LOGGER_CATEGORY
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    protected void
    protected byte[]
    getBase64DecodedMessage.
    abstract String
    Get the binding of the message context;.
    protected void
    Populate the context which carries information specific to this binding.
    void
    setParserPool(net.shibboleth.shared.xml.ParserPool pool)
    Sets the parser pool used to deserialize incoming messages.
    protected org.opensaml.core.xml.XMLObject
    Helper method that deserializes and unmarshalls the message from the given stream.

    Methods inherited from class org.opensaml.messaging.decoder.AbstractMessageDecoder

    decode, doDecode, getMessageContext, getMessageToLog, getProtocolMessageLogger, getProtocolMessageLoggerSubCategory, logDecodedMessage, serializeMessageForLogging, setMessageContext, setProtocolMessageLoggerSubCategory

    Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

    checkComponentActive, checkSetterPreconditions, destroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, 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.shared.component.DestructableComponent

    destroy, isDestroyed

    Methods inherited from interface net.shibboleth.shared.component.InitializableComponent

    initialize, isInitialized
  • Field Details

    • parserPool

      protected net.shibboleth.shared.xml.ParserPool parserPool
      Parser pool used to deserialize the message.
    • callContext

      protected final org.pac4j.core.context.CallContext callContext
  • Constructor Details

    • AbstractPac4jDecoder

      public AbstractPac4jDecoder()
  • Method Details

    • getBase64DecodedMessage

      protected byte[] getBase64DecodedMessage() throws org.opensaml.messaging.decoder.MessageDecodingException

      getBase64DecodedMessage.

      Returns:
      an array of byte objects
      Throws:
      org.opensaml.messaging.decoder.MessageDecodingException - if any.
    • doDestroy

      protected void doDestroy()
      Overrides:
      doDestroy in class net.shibboleth.shared.component.AbstractInitializableComponent
    • doInitialize

      protected void doInitialize() throws net.shibboleth.shared.component.ComponentInitializationException
      Overrides:
      doInitialize in class net.shibboleth.shared.component.AbstractInitializableComponent
      Throws:
      net.shibboleth.shared.component.ComponentInitializationException
    • populateBindingContext

      protected void populateBindingContext(SAML2MessageContext messageContext)
      Populate the context which carries information specific to this binding.
      Parameters:
      messageContext - the current message context
    • getBindingURI

      public abstract String getBindingURI(SAML2MessageContext messageContext)
      Get the binding of the message context;.
      Parameters:
      messageContext - the message context
      Returns:
      the binding URI
    • unmarshallMessage

      protected org.opensaml.core.xml.XMLObject unmarshallMessage(InputStream messageStream) throws org.opensaml.messaging.decoder.MessageDecodingException
      Helper method that deserializes and unmarshalls the message from the given stream.
      Parameters:
      messageStream - input stream containing the message
      Returns:
      the inbound message
      Throws:
      org.opensaml.messaging.decoder.MessageDecodingException - thrown if there is a problem deserializing/unmarshalling the message
    • setParserPool

      public void setParserPool(net.shibboleth.shared.xml.ParserPool pool)
      Sets the parser pool used to deserialize incoming messages.
      Parameters:
      pool - parser pool used to deserialize incoming messages