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
ConstructorDescriptionDefaultPac4jSAMLResponse
(org.pac4j.core.context.WebContext response) Constructs a response adaptor wrapping the given response. -
Method Summary
Modifier and TypeMethodDescriptionfinal String
Gets outgoing content.Gets output stream writer.Gets redirect url.org.pac4j.core.context.WebContext
Gets web context.void
init()
Initialize the response handling.void
setContentType
(String type) Sets content type.void
final void
setRedirectUrl
(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:Pac4jSAMLResponse
Gets outgoing content.- Specified by:
getOutgoingContent
in interfacePac4jSAMLResponse
- Returns:
- the outgoing content
-
getWebContext
public org.pac4j.core.context.WebContext getWebContext()Description copied from interface:Pac4jSAMLResponse
Gets web context.- Specified by:
getWebContext
in interfacePac4jSAMLResponse
- Returns:
- the web context
-
init
public void init()Description copied from interface:Pac4jSAMLResponse
Initialize the response handling.- Specified by:
init
in interfacePac4jSAMLResponse
-
getOutputStreamWriter
Description copied from interface:Pac4jSAMLResponse
Gets output stream writer.- Specified by:
getOutputStreamWriter
in interfacePac4jSAMLResponse
- Returns:
- the output stream writer
-
setNoCacheHeaders
public void setNoCacheHeaders() -
setContentType
Description copied from interface:Pac4jSAMLResponse
Sets content type.- Specified by:
setContentType
in interfacePac4jSAMLResponse
- Parameters:
type
- the type
-
setRedirectUrl
Description copied from interface:Pac4jSAMLResponse
Sets redirect url.- Specified by:
setRedirectUrl
in interfacePac4jSAMLResponse
- Parameters:
redirectUrl
- the url
-
getRedirectUrl
Description copied from interface:Pac4jSAMLResponse
Gets redirect url.- Specified by:
getRedirectUrl
in interfacePac4jSAMLResponse
- Returns:
- the redirect url
-