Package org.pac4j.saml.transport
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
FieldsModifier and TypeFieldDescriptionprotected final org.pac4j.core.context.WebContextprotected final org.slf4j.Loggerprotected net.shibboleth.shared.xml.ParserPoolParser pool used to deserialize the message. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidprotected byte[]abstract StringgetBindingURI(SAML2MessageContext messageContext) Get the binding of the message context;.net.shibboleth.shared.xml.ParserPoolGets 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.shared.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, setMessageContextMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.DestructableComponent
destroy, isDestroyedMethods 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 parserPoolParser 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:
doDestroyin classorg.opensaml.messaging.decoder.AbstractMessageDecoder
-
doInitialize
protected void doInitialize() throws net.shibboleth.shared.component.ComponentInitializationException- Overrides:
doInitializein classnet.shibboleth.shared.component.AbstractInitializableComponent- Throws:
net.shibboleth.shared.component.ComponentInitializationException
-
populateBindingContext
Populate the context which carries information specific to this binding.- Parameters:
messageContext- the current message context
-
getBindingURI
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
-