Package org.pac4j.saml.transport
Class DefaultPac4jSAMLResponse
- java.lang.Object
-
- org.pac4j.saml.transport.DefaultPac4jSAMLResponse
-
- All Implemented Interfaces:
Pac4jSAMLResponse
public class DefaultPac4jSAMLResponse extends java.lang.Object implements Pac4jSAMLResponse
Empty response adapter containing aByteArrayOutputStreamin order opensaml can write the saml messages. The content can be retrieved as a String from getOutgoingContent().- Since:
- 1.8
- Author:
- Misagh Moayyed
-
-
Constructor Summary
Constructors Constructor Description DefaultPac4jSAMLResponse(org.pac4j.core.context.WebContext response)Constructs a response adaptor wrapping the given response.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetOutgoingContent()Gets outgoing content.java.io.OutputStreamWritergetOutputStreamWriter()Gets output stream writer.java.lang.StringgetRedirectUrl()Gets redirect url.org.pac4j.core.context.WebContextgetWebContext()Gets web context.voidinit()Initialize the response handling.voidsetContentType(java.lang.String type)Sets content type.voidsetNoCacheHeaders()voidsetRedirectUrl(java.lang.String redirectUrl)Sets redirect url.
-
-
-
Method Detail
-
getOutgoingContent
public final java.lang.String getOutgoingContent()
Description copied from interface:Pac4jSAMLResponseGets outgoing content.- Specified by:
getOutgoingContentin interfacePac4jSAMLResponse- Returns:
- the outgoing content
-
getWebContext
public org.pac4j.core.context.WebContext getWebContext()
Description copied from interface:Pac4jSAMLResponseGets web context.- Specified by:
getWebContextin interfacePac4jSAMLResponse- Returns:
- the web context
-
init
public void init()
Description copied from interface:Pac4jSAMLResponseInitialize the response handling.- Specified by:
initin interfacePac4jSAMLResponse
-
getOutputStreamWriter
public java.io.OutputStreamWriter getOutputStreamWriter()
Description copied from interface:Pac4jSAMLResponseGets output stream writer.- Specified by:
getOutputStreamWriterin interfacePac4jSAMLResponse- Returns:
- the output stream writer
-
setNoCacheHeaders
public void setNoCacheHeaders()
-
setContentType
public void setContentType(java.lang.String type)
Description copied from interface:Pac4jSAMLResponseSets content type.- Specified by:
setContentTypein interfacePac4jSAMLResponse- Parameters:
type- the type
-
setRedirectUrl
public final void setRedirectUrl(java.lang.String redirectUrl)
Description copied from interface:Pac4jSAMLResponseSets redirect url.- Specified by:
setRedirectUrlin interfacePac4jSAMLResponse- Parameters:
redirectUrl- the url
-
getRedirectUrl
public java.lang.String getRedirectUrl()
Description copied from interface:Pac4jSAMLResponseGets redirect url.- Specified by:
getRedirectUrlin interfacePac4jSAMLResponse- Returns:
- the redirect url
-
-