Class RedirectOutputService
java.lang.Object
swiss.trustbroker.homerealmdiscovery.service.RedirectOutputService
Output redirect in a form suitable for a calling script (XMLHttpRequest/fetch).
-
Constructor Summary
ConstructorsConstructorDescriptionRedirectOutputService(org.apache.velocity.app.VelocityEngine velocityEngine, TrustBrokerProperties trustBrokerProperties) -
Method Summary
Modifier and TypeMethodDescriptionhandleRedirect(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String redirectUrl) Absolute redirects are rendered via a page that auto-forwards to the link as they may be 3rd party / CORS without access granted to the calling script.
-
Constructor Details
-
RedirectOutputService
public RedirectOutputService(org.apache.velocity.app.VelocityEngine velocityEngine, TrustBrokerProperties trustBrokerProperties)
-
-
Method Details
-
handleRedirect
public String handleRedirect(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String redirectUrl) Absolute redirects are rendered via a page that auto-forwards to the link as they may be 3rd party / CORS without access granted to the calling script.
Note: Caller must generate/validate redirectUrl to avoid open redirects.- Returns:
- URL to redirect to or null if there's no redirect or the redirect was handled by this method .
-