Class ThymeleafResponsePage

java.lang.Object
se.swedenconnect.spring.saml.idp.response.ThymeleafResponsePage
All Implemented Interfaces:
ResponsePage

public class ThymeleafResponsePage extends Object implements ResponsePage
A ResponsePage implementation that uses a Thymeleaf template engine.
Author:
Martin Lindström
  • Constructor Summary

    Constructors
    Constructor
    Description
    ThymeleafResponsePage(org.thymeleaf.spring6.SpringTemplateEngine templateEngine, String templateId)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    sendResponse(jakarta.servlet.http.HttpServletRequest httpServletRequest, jakarta.servlet.http.HttpServletResponse httpServletResponse, String destination, String samlResponse, String relayState)
    Sends a SAML Response message to the given destination.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ThymeleafResponsePage

      public ThymeleafResponsePage(org.thymeleaf.spring6.SpringTemplateEngine templateEngine, String templateId)
      Constructor.
      Parameters:
      templateEngine - the template engine
      templateId - the template id, for example "post.html"
  • Method Details

    • sendResponse

      public void sendResponse(jakarta.servlet.http.HttpServletRequest httpServletRequest, jakarta.servlet.http.HttpServletResponse httpServletResponse, String destination, String samlResponse, String relayState) throws IOException
      Sends a SAML Response message to the given destination.
      Specified by:
      sendResponse in interface ResponsePage
      Parameters:
      httpServletRequest - the HTTP servlet request (in case the implementation wants to redirect the user)
      httpServletResponse - the HTTP servlet response
      destination - the destination URL
      samlResponse - the Base64-encoded SAML response message
      relayState - the relay state (may be null)
      Throws:
      IOException - for errors writing to the servlet response