Package org.pac4j.saml.transport
Class DefaultPac4jSAMLResponse
- java.lang.Object
-
- org.pac4j.saml.transport.DefaultPac4jSAMLResponse
-
- All Implemented Interfaces:
Pac4jSAMLResponse
public class DefaultPac4jSAMLResponse extends 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(WebContext response)Constructs a response adaptor wrapping the given response.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetOutgoingContent()Gets outgoing content.OutputStreamWritergetOutputStreamWriter()Gets output stream writer.StringgetRedirectUrl()Gets redirect url.WebContextgetWebContext()Gets web context.voidinit()Initialize the response handling.voidsetContentType(String type)Sets content type.voidsetNoCacheHeaders()voidsetRedirectUrl(String redirectUrl)Sets redirect url.
-
-
-
Constructor Detail
-
DefaultPac4jSAMLResponse
public DefaultPac4jSAMLResponse(WebContext response)
Constructs a response adaptor wrapping the given response.- Parameters:
response- the response- Throws:
IllegalArgumentException- if the response is null
-
-
Method Detail
-
getOutgoingContent
public final String getOutgoingContent()
Description copied from interface:Pac4jSAMLResponseGets outgoing content.- Specified by:
getOutgoingContentin interfacePac4jSAMLResponse- Returns:
- the outgoing content
-
getWebContext
public 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 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(String type)
Description copied from interface:Pac4jSAMLResponseSets content type.- Specified by:
setContentTypein interfacePac4jSAMLResponse- Parameters:
type- the type
-
setRedirectUrl
public final void setRedirectUrl(String redirectUrl)
Description copied from interface:Pac4jSAMLResponseSets redirect url.- Specified by:
setRedirectUrlin interfacePac4jSAMLResponse- Parameters:
redirectUrl- the url
-
getRedirectUrl
public String getRedirectUrl()
Description copied from interface:Pac4jSAMLResponseGets redirect url.- Specified by:
getRedirectUrlin interfacePac4jSAMLResponse- Returns:
- the redirect url
-
-