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.WebContext
     
    protected final org.slf4j.Logger
     
    protected net.shibboleth.shared.xml.ParserPool
    Parser pool used to deserialize the message.
  • Constructor Summary

    Constructors
    Constructor
    Description
    AbstractPac4jDecoder(org.pac4j.core.context.WebContext context)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
     
    protected void
     
    protected byte[]
     
    abstract String
    Get the binding of the message context;.
    net.shibboleth.shared.xml.ParserPool
    Gets the parser pool used to deserialize incoming messages.
    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, setMessageContext

    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

    • logger

      protected final org.slf4j.Logger logger
    • parserPool

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

      protected final org.pac4j.core.context.WebContext context
  • Constructor Details

    • AbstractPac4jDecoder

      public AbstractPac4jDecoder(org.pac4j.core.context.WebContext context)
  • Method Details

    • getBase64DecodedMessage

      protected byte[] getBase64DecodedMessage() throws org.opensaml.messaging.decoder.MessageDecodingException
      Throws:
      org.opensaml.messaging.decoder.MessageDecodingException
    • doDestroy

      protected void doDestroy()
      Overrides:
      doDestroy in class org.opensaml.messaging.decoder.AbstractMessageDecoder
    • 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 and unmarshalling the message
    • getParserPool

      public net.shibboleth.shared.xml.ParserPool getParserPool()
      Gets the parser pool used to deserialize incoming messages.
      Returns:
      parser pool used to deserialize incoming messages
    • 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