commit
c736fab75e
3 changed files with 20 additions and 6 deletions
|
@ -34,6 +34,13 @@
|
||||||
<build>
|
<build>
|
||||||
<finalName>keycloak-demo-${project.version}</finalName>
|
<finalName>keycloak-demo-${project.version}</finalName>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-deploy-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<skip>true</skip>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-dependency-plugin</artifactId>
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
|
|
@ -18,6 +18,13 @@
|
||||||
<build>
|
<build>
|
||||||
<finalName>auth-server</finalName>
|
<finalName>auth-server</finalName>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-deploy-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<skip>true</skip>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.jboss.as.plugins</groupId>
|
<groupId>org.jboss.as.plugins</groupId>
|
||||||
<artifactId>jboss-as-maven-plugin</artifactId>
|
<artifactId>jboss-as-maven-plugin</artifactId>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<%@ page import="org.keycloak.admin.client.Keycloak" %>
|
<%@ page import="org.keycloak.admin.client.Keycloak" %>
|
||||||
<%@ page import="org.keycloak.admin.client.resource.ClientsResource" %>
|
<%@ page import="org.keycloak.admin.client.resource.ClientsResource" %>
|
||||||
<%@ page import="org.keycloak.representations.idm.ApplicationRepresentation" %>
|
<%@ page import="org.keycloak.representations.idm.ClientRepresentation" %>
|
||||||
<%@ page import="org.keycloak.util.UriUtils" %>
|
<%@ page import="org.keycloak.util.UriUtils" %>
|
||||||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %>
|
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %>
|
||||||
<%@ page session="false" %>
|
<%@ page session="false" %>
|
||||||
|
@ -13,16 +13,16 @@
|
||||||
String authServer = UriUtils.getOrigin(request.getRequestURL().toString()) + "/auth";
|
String authServer = UriUtils.getOrigin(request.getRequestURL().toString()) + "/auth";
|
||||||
|
|
||||||
Keycloak keycloak = Keycloak.getInstance(authServer, "example", "examples-admin-client", "password", "examples-admin-client", "password");
|
Keycloak keycloak = Keycloak.getInstance(authServer, "example", "examples-admin-client", "password", "examples-admin-client", "password");
|
||||||
ClientsResource applications = keycloak.realm("example").applications();
|
ClientsResource clients = keycloak.realm("example").clients();
|
||||||
|
|
||||||
out.println("<h1>Applications</h1>");
|
out.println("<h1>Applications</h1>");
|
||||||
out.println("<ul>");
|
out.println("<ul>");
|
||||||
for (ApplicationRepresentation app : applications.findAll()) {
|
for (ClientRepresentation client : clients.findAll()) {
|
||||||
out.println("\t<li>");
|
out.println("\t<li>");
|
||||||
if (app.getBaseUrl() != null) {
|
if (client.getBaseUrl() != null) {
|
||||||
out.println("\t\t<a href=\"" + app.getBaseUrl() + "\">" + app.getName() + "</a>");
|
out.println("\t\t<a href=\"" + client.getBaseUrl() + "\">" + client.getClientId() + "</a>");
|
||||||
} else {
|
} else {
|
||||||
out.println("\t\t" + app.getName());
|
out.println("\t\t" + client.getClientId());
|
||||||
}
|
}
|
||||||
out.println("</li>");
|
out.println("</li>");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue