Package org.pac4j.saml.transport
Class AbstractPac4jDecoder
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- org.opensaml.messaging.decoder.AbstractMessageDecoder
-
- org.pac4j.saml.transport.AbstractPac4jDecoder
-
- All Implemented Interfaces:
net.shibboleth.utilities.java.support.component.Component
,net.shibboleth.utilities.java.support.component.DestructableComponent
,net.shibboleth.utilities.java.support.component.InitializableComponent
,net.shibboleth.utilities.java.support.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 WebContext
context
protected org.slf4j.Logger
logger
protected net.shibboleth.utilities.java.support.xml.ParserPool
parserPool
Parser pool used to deserialize the message.
-
Constructor Summary
Constructors Constructor Description AbstractPac4jDecoder(WebContext context)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
doDestroy()
protected void
doInitialize()
protected byte[]
getBase64DecodedMessage()
abstract String
getBindingURI(SAML2MessageContext messageContext)
Get the binding of the message context;.net.shibboleth.utilities.java.support.xml.ParserPool
getParserPool()
Gets the parser pool used to deserialize incoming messages.protected void
populateBindingContext(SAML2MessageContext messageContext)
Populate the context which carries information specific to this binding.void
setParserPool(net.shibboleth.utilities.java.support.xml.ParserPool pool)
Sets the parser pool used to deserialize incoming messages.protected org.opensaml.core.xml.XMLObject
unmarshallMessage(InputStream messageStream)
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.utilities.java.support.component.AbstractInitializableComponent
destroy, initialize, isDestroyed, isInitialized
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Field Detail
-
logger
protected final org.slf4j.Logger logger
-
parserPool
protected net.shibboleth.utilities.java.support.xml.ParserPool parserPool
Parser pool used to deserialize the message.
-
context
protected final WebContext context
-
-
Constructor Detail
-
AbstractPac4jDecoder
public AbstractPac4jDecoder(WebContext context)
-
-
Method Detail
-
getBase64DecodedMessage
protected byte[] getBase64DecodedMessage() throws org.opensaml.messaging.decoder.MessageDecodingException
- Throws:
org.opensaml.messaging.decoder.MessageDecodingException
-
doDestroy
protected void doDestroy()
- Overrides:
doDestroy
in classorg.opensaml.messaging.decoder.AbstractMessageDecoder
-
doInitialize
protected void doInitialize() throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
- Overrides:
doInitialize
in classnet.shibboleth.utilities.java.support.component.AbstractInitializableComponent
- Throws:
net.shibboleth.utilities.java.support.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
@Nonnull public net.shibboleth.utilities.java.support.xml.ParserPool getParserPool()
Gets the parser pool used to deserialize incoming messages.- Returns:
- parser pool used to deserialize incoming messages
-
setParserPool
public void setParserPool(@Nonnull net.shibboleth.utilities.java.support.xml.ParserPool pool)
Sets the parser pool used to deserialize incoming messages.- Parameters:
pool
- parser pool used to deserialize incoming messages
-
-