From 9a1ef6190428cde034a78c23bb3e8d2e34a31be6 Mon Sep 17 00:00:00 2001 From: Bill Burke Date: Thu, 5 Dec 2013 17:19:52 -0500 Subject: [PATCH] refactor dependencies --- examples/as7-eap-demo/server/pom.xml | 38 ++++++++++++++++--- .../main/resources/META-INF/testrealm.json | 9 ++--- .../WEB-INF/jboss-deployment-structure.xml | 29 +++++++++----- .../as7/OAuthManagedResourceValve.java | 3 -- 4 files changed, 57 insertions(+), 22 deletions(-) diff --git a/examples/as7-eap-demo/server/pom.xml b/examples/as7-eap-demo/server/pom.xml index 94bff3065f..dba8cf7c9d 100755 --- a/examples/as7-eap-demo/server/pom.xml +++ b/examples/as7-eap-demo/server/pom.xml @@ -15,11 +15,6 @@ - - org.jboss.resteasy - jose-jwt - provided - org.keycloak keycloak-core @@ -75,6 +70,7 @@ keycloak-admin-ui-styles ${project.version} + com.h2database h2 @@ -122,6 +119,37 @@ jboss-servlet-api_3.0_spec provided + + + org.jboss.resteasy + jose-jwt + ${resteasy.version} + + + org.jboss.resteasy + resteasy-jaxrs + ${resteasy.version} + + + org.jboss.resteasy + resteasy-client + ${resteasy.version} + + + org.jboss.resteasy + async-http-servlet-3.0 + ${resteasy.version} + + + org.jboss.resteasy + jaxrs-api + ${resteasy.version} + + + org.jboss.resteasy + resteasy-jackson-provider + ${resteasy.version} + diff --git a/examples/as7-eap-demo/server/src/main/resources/META-INF/testrealm.json b/examples/as7-eap-demo/server/src/main/resources/META-INF/testrealm.json index 893ff391be..fca38a9348 100755 --- a/examples/as7-eap-demo/server/src/main/resources/META-INF/testrealm.json +++ b/examples/as7-eap-demo/server/src/main/resources/META-INF/testrealm.json @@ -7,15 +7,14 @@ "accountManagement": true, "sslNotRequired": true, "cookieLoginAllowed": true, - "registrationAllowed": true, - "social": true, + "registrationAllowed": false, + "social": false, "automaticRegistrationAfterSocialLogin": false, "privateKey": "MIICXAIBAAKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQABAoGAfmO8gVhyBxdqlxmIuglbz8bcjQbhXJLR2EoS8ngTXmN1bo2L90M0mUKSdc7qF10LgETBzqL8jYlQIbt+e6TH8fcEpKCjUlyq0Mf/vVbfZSNaVycY13nTzo27iPyWQHK5NLuJzn1xvxxrUeXI6A2WFpGEBLbHjwpx5WQG9A+2scECQQDvdn9NE75HPTVPxBqsEd2z10TKkl9CZxu10Qby3iQQmWLEJ9LNmy3acvKrE3gMiYNWb6xHPKiIqOR1as7L24aTAkEAtyvQOlCvr5kAjVqrEKXalj0Tzewjweuxc0pskvArTI2Oo070h65GpoIKLc9jf+UA69cRtquwP93aZKtW06U8dQJAF2Y44ks/mK5+eyDqik3koCI08qaC8HYq2wVl7G2QkJ6sbAaILtcvD92ToOvyGyeE0flvmDZxMYlvaZnaQ0lcSQJBAKZU6umJi3/xeEbkJqMfeLclD27XGEFoPeNrmdx0q10Azp4NfJAY+Z8KRyQCR2BEG+oNitBOZ+YXF9KCpH3cdmECQHEigJhYg+ykOvr1aiZUMFT72HU0jnmQe2FVekuG+LJUt2Tm7GtMjTFoGpf0JwrVuZN39fOYAlo+nTixgeW7X8Y=", "publicKey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB", "requiredCredentials": [ "password" ], "requiredApplicationCredentials": [ "password" ], "requiredOAuthClientCredentials": [ "password" ], - "defaultRoles": [ "user" ], "users" : [ { "username" : "bburke@redhat.com", @@ -32,11 +31,11 @@ "roles": [ { "name": "user", - "description": "Have User privileges" + "description": "User privileges" }, { "name": "admin", - "description": "Have Administrator privileges" + "description": "Administrator privileges" } ], "roleMappings": [ diff --git a/examples/as7-eap-demo/server/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/examples/as7-eap-demo/server/src/main/webapp/WEB-INF/jboss-deployment-structure.xml index 8caa96f6a0..2654f310d6 100755 --- a/examples/as7-eap-demo/server/src/main/webapp/WEB-INF/jboss-deployment-structure.xml +++ b/examples/as7-eap-demo/server/src/main/webapp/WEB-INF/jboss-deployment-structure.xml @@ -1,10 +1,21 @@ - - - - - - - - - + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/integration/as7-eap6/adapter/src/main/java/org/keycloak/adapters/as7/OAuthManagedResourceValve.java b/integration/as7-eap6/adapter/src/main/java/org/keycloak/adapters/as7/OAuthManagedResourceValve.java index 3d67ed4d8b..e43b97070c 100755 --- a/integration/as7-eap6/adapter/src/main/java/org/keycloak/adapters/as7/OAuthManagedResourceValve.java +++ b/integration/as7-eap6/adapter/src/main/java/org/keycloak/adapters/as7/OAuthManagedResourceValve.java @@ -13,7 +13,6 @@ import org.apache.catalina.core.StandardContext; import org.apache.catalina.deploy.LoginConfig; import org.apache.catalina.realm.GenericPrincipal; import org.jboss.logging.Logger; -import org.jboss.resteasy.client.jaxrs.ResteasyClient; import org.jboss.resteasy.jose.jws.JWSInput; import org.jboss.resteasy.jose.jws.crypto.RSAProvider; import org.jboss.resteasy.jwt.JsonSerialization; @@ -31,10 +30,8 @@ import org.keycloak.representations.idm.admin.LogoutAction; import javax.security.auth.login.LoginException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletResponse; -import javax.ws.rs.core.UriBuilder; import java.io.IOException; import java.util.HashSet; -import java.util.Map; import java.util.Set; /**