From c4808a3e61559ef34db020932b06eb7e4e8af75e Mon Sep 17 00:00:00 2001 From: mposolda Date: Thu, 29 May 2014 10:29:06 +0200 Subject: [PATCH] Fix admin-App example --- .../src/main/java/org/keycloak/example/AdminClient.java | 9 ++------- .../admin-access-app/src/main/webapp/index.html | 5 +++++ 2 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 examples/demo-template/admin-access-app/src/main/webapp/index.html diff --git a/examples/demo-template/admin-access-app/src/main/java/org/keycloak/example/AdminClient.java b/examples/demo-template/admin-access-app/src/main/java/org/keycloak/example/AdminClient.java index 6f631401a5..09a3633bcc 100755 --- a/examples/demo-template/admin-access-app/src/main/java/org/keycloak/example/AdminClient.java +++ b/examples/demo-template/admin-access-app/src/main/java/org/keycloak/example/AdminClient.java @@ -8,19 +8,14 @@ import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.message.BasicNameValuePair; -import org.keycloak.KeycloakSecurityContext; import org.keycloak.OAuth2Constants; import org.keycloak.ServiceUrlConstants; import org.keycloak.adapters.HttpClientBuilder; import org.keycloak.representations.AccessTokenResponse; -import org.keycloak.representations.IDToken; -import org.keycloak.representations.idm.CredentialRepresentation; import org.keycloak.representations.idm.RoleRepresentation; -import org.keycloak.util.BasicAuthHelper; import org.keycloak.util.JsonSerialization; import org.keycloak.util.KeycloakUriBuilder; -import javax.servlet.http.HttpServletRequest; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; @@ -107,8 +102,8 @@ public class AdminClient { try { HttpGet get = new HttpGet(KeycloakUriBuilder.fromUri("http://localhost:8080/auth") - .path(ServiceUrlConstants.TOKEN_SERVICE_LOGIN_PATH) - .queryParam("session-state", res.getSessionState()) + .path(ServiceUrlConstants.TOKEN_SERVICE_LOGOUT_PATH) + .queryParam("session_state", res.getSessionState()) .build("demo")); HttpResponse response = client.execute(get); HttpEntity entity = response.getEntity(); diff --git a/examples/demo-template/admin-access-app/src/main/webapp/index.html b/examples/demo-template/admin-access-app/src/main/webapp/index.html new file mode 100644 index 0000000000..22f152da8e --- /dev/null +++ b/examples/demo-template/admin-access-app/src/main/webapp/index.html @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file