Class ThymeleafResponsePage
java.lang.Object
se.swedenconnect.spring.saml.idp.response.ThymeleafResponsePage
- All Implemented Interfaces:
ResponsePage
A
ResponsePage
implementation that uses a Thymeleaf template engine.- Author:
- Martin Lindström
-
Constructor Summary
ConstructorDescriptionThymeleafResponsePage
(org.thymeleaf.spring6.SpringTemplateEngine templateEngine, String templateId) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.
-
Constructor Details
-
ThymeleafResponsePage
public ThymeleafResponsePage(org.thymeleaf.spring6.SpringTemplateEngine templateEngine, String templateId) Constructor.- Parameters:
templateEngine
- the template enginetemplateId
- 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 interfaceResponsePage
- Parameters:
httpServletRequest
- the HTTP servlet request (in case the implementation wants to redirect the user)httpServletResponse
- the HTTP servlet responsedestination
- the destination URLsamlResponse
- the Base64-encoded SAML response messagerelayState
- the relay state (may be null)- Throws:
IOException
- for errors writing to the servlet response
-