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 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 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

      public final String getOutgoingContent()
      Gets outgoing content.
      Specified by:
      getOutgoingContent in interface Pac4jSAMLResponse
      Returns:
      the outgoing content
    • init

      public void init()
      Initialize the response handling.
      Specified by:
      init in interface Pac4jSAMLResponse
    • setNoCacheHeaders

      public void setNoCacheHeaders()

      setNoCacheHeaders.

    • setContentType

      public void setContentType(String type)
      Sets content type.
      Specified by:
      setContentType in interface Pac4jSAMLResponse
      Parameters:
      type - the type