Package org.pac4j.saml.transport
Class DefaultPac4jSAMLResponse
java.lang.Object
org.pac4j.saml.transport.DefaultPac4jSAMLResponse
- All Implemented Interfaces:
Pac4jSAMLResponse
Empty response adapter containing a
ByteArrayOutputStream in 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
ConstructorsConstructorDescriptionDefaultPac4jSAMLResponse(org.pac4j.core.context.WebContext response) Constructs a response adaptor wrapping the given response. -
Method Summary
Modifier and TypeMethodDescriptionfinal StringGets outgoing content.Gets output stream writer.Gets redirect url.org.pac4j.core.context.WebContextGets web context.voidinit()Initialize the response handling.voidsetContentType(String type) Sets content type.voidfinal voidsetRedirectUrl(String redirectUrl) Sets redirect url.
-
Constructor Details
-
DefaultPac4jSAMLResponse
public DefaultPac4jSAMLResponse(org.pac4j.core.context.WebContext response) Constructs a response adaptor wrapping the given response.- Parameters:
response- the response- Throws:
IllegalArgumentException- if the response is null
-
-
Method Details
-
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
Description copied from interface:Pac4jSAMLResponseGets output stream writer.- Specified by:
getOutputStreamWriterin interfacePac4jSAMLResponse- Returns:
- the output stream writer
-
setNoCacheHeaders
public void setNoCacheHeaders() -
setContentType
Description copied from interface:Pac4jSAMLResponseSets content type.- Specified by:
setContentTypein interfacePac4jSAMLResponse- Parameters:
type- the type
-
setRedirectUrl
Description copied from interface:Pac4jSAMLResponseSets redirect url.- Specified by:
setRedirectUrlin interfacePac4jSAMLResponse- Parameters:
redirectUrl- the url
-
getRedirectUrl
Description copied from interface:Pac4jSAMLResponseGets redirect url.- Specified by:
getRedirectUrlin interfacePac4jSAMLResponse- Returns:
- the redirect url
-