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 aByteArrayOutputStream
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
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 String
getOutgoingContent()
Gets outgoing content.OutputStreamWriter
getOutputStreamWriter()
Gets output stream writer.String
getRedirectUrl()
Gets redirect url.WebContext
getWebContext()
Gets web context.void
init()
Initialize the response handling.void
setContentType(String type)
Sets content type.void
setNoCacheHeaders()
void
setRedirectUrl(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:Pac4jSAMLResponse
Gets outgoing content.- Specified by:
getOutgoingContent
in interfacePac4jSAMLResponse
- Returns:
- the outgoing content
-
getWebContext
public 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
public OutputStreamWriter 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
public void setContentType(String type)
Description copied from interface:Pac4jSAMLResponse
Sets content type.- Specified by:
setContentType
in interfacePac4jSAMLResponse
- Parameters:
type
- the type
-
setRedirectUrl
public final void setRedirectUrl(String redirectUrl)
Description copied from interface:Pac4jSAMLResponse
Sets redirect url.- Specified by:
setRedirectUrl
in interfacePac4jSAMLResponse
- Parameters:
redirectUrl
- the url
-
getRedirectUrl
public String getRedirectUrl()
Description copied from interface:Pac4jSAMLResponse
Gets redirect url.- Specified by:
getRedirectUrl
in interfacePac4jSAMLResponse
- Returns:
- the redirect url
-
-