2016-07-29 15:42:53 +00:00
|
|
|
<%@ page import="org.keycloak.common.util.KeycloakUriBuilder" %>
|
|
|
|
<%@ page import="org.keycloak.constants.ServiceUrlConstants" %>
|
|
|
|
<%
|
|
|
|
String scheme = request.getScheme();
|
|
|
|
String host = request.getServerName();
|
|
|
|
int port = request.getServerPort();
|
|
|
|
String contextPath = request.getContextPath();
|
|
|
|
String redirectUri = scheme + "://" + host + ":" + port + contextPath;
|
2018-09-27 09:24:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
boolean isTLSEnabled = Boolean.parseBoolean(System.getProperty("auth.server.ssl.required", "true"));
|
|
|
|
String authPort = isTLSEnabled ? System.getProperty("auth.server.https.port", "8543") : System.getProperty("auth.server.http.port", "8180");
|
|
|
|
String authScheme = isTLSEnabled ? "https" : "http";
|
|
|
|
String authUri = authScheme + "://localhost:" + authPort + "/auth";
|
2016-07-29 15:42:53 +00:00
|
|
|
%>
|
2018-09-27 09:24:33 +00:00
|
|
|
<h2>Click here <a href="<%= KeycloakUriBuilder.fromUri(authUri).path(ServiceUrlConstants.TOKEN_SERVICE_LOGOUT_PATH)
|
2016-07-29 15:42:53 +00:00
|
|
|
.queryParam("redirect_uri", redirectUri).build("servlet-authz").toString()%>">Sign Out</a></h2>
|