Package org.pac4j.saml.transport
Class AbstractPac4jDecoder
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- org.opensaml.messaging.decoder.AbstractMessageDecoder<org.opensaml.saml.common.SAMLObject>
-
- 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<org.opensaml.saml.common.SAMLObject>
- Direct Known Subclasses:
Pac4jHTTPPostDecoder,Pac4jHTTPRedirectDeflateDecoder,SAML2ArtifactBindingDecoder
public abstract class AbstractPac4jDecoder extends org.opensaml.messaging.decoder.AbstractMessageDecoder<org.opensaml.saml.common.SAMLObject>Common decoder.- Since:
- 3.4.0
- Author:
- Jerome Leleu
-
-
Field Summary
Fields Modifier and Type Field Description protected WebContextcontextprotected org.slf4j.Loggerloggerprotected net.shibboleth.utilities.java.support.xml.ParserPoolparserPoolParser 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 voiddoDestroy()protected voiddoInitialize()protected byte[]getBase64DecodedMessage()abstract StringgetBindingURI(SAML2MessageContext messageContext)Get the binding of the message context;.net.shibboleth.utilities.java.support.xml.ParserPoolgetParserPool()Gets the parser pool used to deserialize incoming messages.protected voidpopulateBindingContext(SAML2MessageContext messageContext)Populate the context which carries information specific to this binding.voidsetParserPool(net.shibboleth.utilities.java.support.xml.ParserPool pool)Sets the parser pool used to deserialize incoming messages.protected org.opensaml.core.xml.XMLObjectunmarshallMessage(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:
doDestroyin classorg.opensaml.messaging.decoder.AbstractMessageDecoder<org.opensaml.saml.common.SAMLObject>
-
doInitialize
protected void doInitialize() throws net.shibboleth.utilities.java.support.component.ComponentInitializationException- Overrides:
doInitializein 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
-
-