%@ page import="org.keycloak.admin.client.Keycloak" %>
<%@ page import="org.keycloak.admin.client.resource.ClientsResource" %>
<%@ page import="org.keycloak.representations.idm.ClientRepresentation" %>
<%@ page import="org.keycloak.util.UriUtils" %>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %>
<%@ page session="false" %>
Applications
<%
String authServer = UriUtils.getOrigin(request.getRequestURL().toString()) + "/auth";
Keycloak keycloak = Keycloak.getInstance(authServer, "example", "examples-admin-client", "password", "examples-admin-client", "password");
ClientsResource clients = keycloak.realm("example").clients();
out.println("Applications
");
out.println("");
for (ClientRepresentation client : clients.findAll()) {
out.println("\t- ");
if (client.getBaseUrl() != null) {
out.println("\t\t" + client.getClientId() + "");
} else {
out.println("\t\t" + client.getClientId());
}
out.println("
");
}
out.println("
");
%>