From 7b14d29dee3843eb9d23bd7376a12838b83a3e82 Mon Sep 17 00:00:00 2001 From: Matthias Wessendorf Date: Tue, 6 May 2014 11:29:08 +0200 Subject: [PATCH] Removing JSP code, adding simple text for a simple demo... --- .../app/src/main/webapp/customers/view.jsp | 38 +------------------ 1 file changed, 2 insertions(+), 36 deletions(-) diff --git a/project-integrations/aerogear-ups/app/src/main/webapp/customers/view.jsp b/project-integrations/aerogear-ups/app/src/main/webapp/customers/view.jsp index be4d93c27e..5e0cc9f308 100755 --- a/project-integrations/aerogear-ups/app/src/main/webapp/customers/view.jsp +++ b/project-integrations/aerogear-ups/app/src/main/webapp/customers/view.jsp @@ -1,47 +1,13 @@ <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %> -<%@ page import="org.keycloak.example.services.CustomerDatabaseClient" %> -<%@ page import="org.keycloak.util.KeycloakUriBuilder" %> -<%@ page import="org.keycloak.representations.IDToken" %> Customer View Page -<% - String logoutUri = KeycloakUriBuilder.fromUri("http://localhost:8080/auth/rest/realms/demo/tokens/logout") - .queryParam("redirect_uri", "http://localhost:8080/app").build().toString(); - String acctUri = "http://localhost:8080/auth/rest/realms/demo/account?referrer=customer-portal"; - IDToken idToken = CustomerDatabaseClient.getIDToken(request); -%> -

logout | manage acct

-Servlet User Principal <%=request.getUserPrincipal().getName()%> - made this request. -

Caller IDToken values (You can specify what is returned in IDToken in the customer-portal claims page in the admin console:

-

Username: <%=idToken.getPreferredUsername()%>

-

Email: <%=idToken.getEmail()%>

-

Full Name: <%=idToken.getName()%>

-

First: <%=idToken.getGivenName()%>

-

Last: <%=idToken.getFamilyName()%>

-

Customer Listing

-<% - java.util.List list = null; - try { - list = CustomerDatabaseClient.getCustomers(request); - } catch (CustomerDatabaseClient.Failure failure) { - out.println("There was a failure processing request. You either didn't configure Keycloak properly, or maybe" + - "you just forgot to secure the database service?"); - out.println("Status from database service invocation was: " + failure.getStatus()); - return; - } - for (String cust : list) { - out.print("

"); - out.print(cust); - out.println("

"); - } -%> + Protected page... +

\ No newline at end of file