From 993fc5c301cf40569a5a780f1e9b0af457711c67 Mon Sep 17 00:00:00 2001 From: Bill Burke Date: Sat, 10 Aug 2013 08:13:39 -0400 Subject: [PATCH] required creds --- .../org/keycloak/AbstractOAuthClient.java | 2 +- .../idm/CredentialRepresentation.java | 14 +- .../idm/RealmRepresentation.java | 18 +- .../idm/RequiredCredentialRepresentation.java | 39 - .../idm/ResourceRepresentation.java | 3 +- .../idm/UserRepresentation.java | 30 +- .../main/resources/META-INF/testrealm.json | 152 +- .../src/main/webapp/saas/admin/index.html | 10 +- .../src/main/webapp/saas/admin/js/app.js | 7 +- .../main/webapp/saas/admin/js/controllers.js | 23 +- .../webapp/saas/admin/lib/angular/select2.js | 195 + .../saas/admin/lib/select2-3.4.1/LICENSE | 18 + .../saas/admin/lib/select2-3.4.1/README.md | 83 + .../admin/lib/select2-3.4.1/component.json | 8 + .../saas/admin/lib/select2-3.4.1/release.sh | 69 + .../lib/select2-3.4.1/select2-spinner.gif | Bin 0 -> 1849 bytes .../saas/admin/lib/select2-3.4.1/select2.css | 680 ++++ .../lib/select2-3.4.1/select2.jquery.json | 36 + .../saas/admin/lib/select2-3.4.1/select2.js | 3137 +++++++++++++++++ .../admin/lib/select2-3.4.1/select2.min.js | 22 + .../saas/admin/lib/select2-3.4.1/select2.png | Bin 0 -> 613 bytes .../lib/select2-3.4.1/select2_locale_ar.js | 17 + .../lib/select2-3.4.1/select2_locale_ca.js | 17 + .../lib/select2-3.4.1/select2_locale_cs.js | 49 + .../lib/select2-3.4.1/select2_locale_da.js | 17 + .../lib/select2-3.4.1/select2_locale_de.js | 15 + .../lib/select2-3.4.1/select2_locale_el.js | 17 + .../select2_locale_en.js.template | 17 + .../lib/select2-3.4.1/select2_locale_es.js | 15 + .../lib/select2-3.4.1/select2_locale_et.js | 17 + .../lib/select2-3.4.1/select2_locale_eu.js | 43 + .../lib/select2-3.4.1/select2_locale_fi.js | 28 + .../lib/select2-3.4.1/select2_locale_fr.js | 15 + .../lib/select2-3.4.1/select2_locale_gl.js | 43 + .../lib/select2-3.4.1/select2_locale_he.js | 17 + .../lib/select2-3.4.1/select2_locale_hr.js | 42 + .../lib/select2-3.4.1/select2_locale_hu.js | 15 + .../lib/select2-3.4.1/select2_locale_id.js | 17 + .../lib/select2-3.4.1/select2_locale_is.js | 16 + .../lib/select2-3.4.1/select2_locale_it.js | 15 + .../lib/select2-3.4.1/select2_locale_ja.js | 15 + .../lib/select2-3.4.1/select2_locale_ko.js | 17 + .../lib/select2-3.4.1/select2_locale_lt.js | 29 + .../lib/select2-3.4.1/select2_locale_lv.js | 16 + .../lib/select2-3.4.1/select2_locale_mk.js | 17 + .../lib/select2-3.4.1/select2_locale_nl.js | 15 + .../lib/select2-3.4.1/select2_locale_no.js | 18 + .../lib/select2-3.4.1/select2_locale_pl.js | 37 + .../lib/select2-3.4.1/select2_locale_pt-BR.js | 15 + .../lib/select2-3.4.1/select2_locale_pt-PT.js | 15 + .../lib/select2-3.4.1/select2_locale_ro.js | 15 + .../lib/select2-3.4.1/select2_locale_ru.js | 15 + .../lib/select2-3.4.1/select2_locale_sk.js | 48 + .../lib/select2-3.4.1/select2_locale_sv.js | 17 + .../lib/select2-3.4.1/select2_locale_tr.js | 17 + .../lib/select2-3.4.1/select2_locale_ua.js | 17 + .../lib/select2-3.4.1/select2_locale_vi.js | 18 + .../lib/select2-3.4.1/select2_locale_zh-CN.js | 14 + .../lib/select2-3.4.1/select2_locale_zh-TW.js | 14 + .../admin/lib/select2-3.4.1/select2x2.png | Bin 0 -> 845 bytes .../saas/admin/partials/application-menu.html | 4 +- .../saas/admin/partials/realm-detail.html | 97 +- .../saas/admin/partials/realm-menu.html | 19 +- .../adapters/as7/ServletOAuthLogin.java | 4 +- .../main/java/org/keycloak/sdk/LoginBean.java | 8 +- .../managers/AuthenticationManager.java | 16 +- .../services/managers/RealmManager.java | 79 +- .../keycloak/services/models/RealmModel.java | 13 +- .../models/RequiredCredentialModel.java | 49 +- .../services/models/UserCredentialModel.java | 9 + .../keycloak/services/models/UserModel.java | 12 + .../models/picketlink/RealmAdapter.java | 44 +- .../models/picketlink/UserAdapter.java | 34 + .../RequiredCredentialRelationship.java | 10 + .../services/resources/SaasService.java | 33 +- .../resources/admin/RealmAdminResource.java | 14 +- .../java/org/keycloak/test/AdapterTest.java | 38 +- .../java/org/keycloak/test/ImportTest.java | 25 + .../org/keycloak/test/RealmCreationTest.java | 8 +- .../src/test/resources/testrealm-demo.json | 86 + services/src/test/resources/testrealm.json | 222 +- 81 files changed, 5771 insertions(+), 400 deletions(-) delete mode 100755 core/src/main/java/org/keycloak/representations/idm/RequiredCredentialRepresentation.java create mode 100755 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/angular/select2.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/LICENSE create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/README.md create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/component.json create mode 100755 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/release.sh create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2-spinner.gif create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2.css create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2.jquery.json create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2.min.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2.png create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_ar.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_ca.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_cs.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_da.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_de.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_el.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_en.js.template create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_es.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_et.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_eu.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_fi.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_fr.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_gl.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_he.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_hr.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_hu.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_id.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_is.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_it.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_ja.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_ko.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_lt.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_lv.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_mk.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_nl.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_no.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_pl.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_pt-BR.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_pt-PT.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_ro.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_ru.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_sk.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_sv.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_tr.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_ua.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_vi.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_zh-CN.js create mode 100755 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2_locale_zh-TW.js create mode 100644 examples/as7-eap-demo/server/src/main/webapp/saas/admin/lib/select2-3.4.1/select2x2.png create mode 100755 services/src/test/resources/testrealm-demo.json diff --git a/core/src/main/java/org/keycloak/AbstractOAuthClient.java b/core/src/main/java/org/keycloak/AbstractOAuthClient.java index 955f9df1b0..592ddab405 100755 --- a/core/src/main/java/org/keycloak/AbstractOAuthClient.java +++ b/core/src/main/java/org/keycloak/AbstractOAuthClient.java @@ -111,7 +111,7 @@ public class AbstractOAuthClient { .param("grant_type", "authorization_code") .param("code", code) .param("client_id", clientId) - .param("Password", password) + .param("password", password) .param("redirect_uri", redirectUri); Response res = client.target(codeUrl).request().header(HttpHeaders.AUTHORIZATION, authHeader).post(Entity.form(codeForm)); try { diff --git a/core/src/main/java/org/keycloak/representations/idm/CredentialRepresentation.java b/core/src/main/java/org/keycloak/representations/idm/CredentialRepresentation.java index 22593171e7..af9b292c47 100755 --- a/core/src/main/java/org/keycloak/representations/idm/CredentialRepresentation.java +++ b/core/src/main/java/org/keycloak/representations/idm/CredentialRepresentation.java @@ -5,9 +5,13 @@ package org.keycloak.representations.idm; * @version $Revision: 1 $ */ public class CredentialRepresentation { + public static final String PASSWORD = "password"; + public static final String TOTP = "totp"; + public static final String CLIENT_CERT = "cert"; + protected String type; protected String value; - protected boolean hashed; + protected String device; public String getType() { return type; @@ -25,11 +29,11 @@ public class CredentialRepresentation { this.value = value; } - public boolean isHashed() { - return hashed; + public String getDevice() { + return device; } - public void setHashed(boolean hashed) { - this.hashed = hashed; + public void setDevice(String device) { + this.device = device; } } diff --git a/core/src/main/java/org/keycloak/representations/idm/RealmRepresentation.java b/core/src/main/java/org/keycloak/representations/idm/RealmRepresentation.java index 896c1c9ab8..53fb2c74e8 100755 --- a/core/src/main/java/org/keycloak/representations/idm/RealmRepresentation.java +++ b/core/src/main/java/org/keycloak/representations/idm/RealmRepresentation.java @@ -20,9 +20,9 @@ public class RealmRepresentation { protected String privateKey; protected String publicKey; protected List roles; - protected List requiredCredentials; - protected List requiredResourceCredentials; - protected List requiredOAuthClientCredentials; + protected List requiredCredentials; + protected List requiredResourceCredentials; + protected List requiredOAuthClientCredentials; protected List users; protected List roleMappings; protected List scopeMappings; @@ -141,27 +141,27 @@ public class RealmRepresentation { return mapping; } - public List getRequiredCredentials() { + public List getRequiredCredentials() { return requiredCredentials; } - public void setRequiredCredentials(List requiredCredentials) { + public void setRequiredCredentials(List requiredCredentials) { this.requiredCredentials = requiredCredentials; } - public List getRequiredResourceCredentials() { + public List getRequiredResourceCredentials() { return requiredResourceCredentials; } - public void setRequiredResourceCredentials(List requiredResourceCredentials) { + public void setRequiredResourceCredentials(List requiredResourceCredentials) { this.requiredResourceCredentials = requiredResourceCredentials; } - public List getRequiredOAuthClientCredentials() { + public List getRequiredOAuthClientCredentials() { return requiredOAuthClientCredentials; } - public void setRequiredOAuthClientCredentials(List requiredOAuthClientCredentials) { + public void setRequiredOAuthClientCredentials(List requiredOAuthClientCredentials) { this.requiredOAuthClientCredentials = requiredOAuthClientCredentials; } diff --git a/core/src/main/java/org/keycloak/representations/idm/RequiredCredentialRepresentation.java b/core/src/main/java/org/keycloak/representations/idm/RequiredCredentialRepresentation.java deleted file mode 100755 index 7a9eaecb13..0000000000 --- a/core/src/main/java/org/keycloak/representations/idm/RequiredCredentialRepresentation.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.keycloak.representations.idm; - -/** - * @author Bill Burke - * @version $Revision: 1 $ - */ -public class RequiredCredentialRepresentation { - public static final String PASSWORD = "Password"; - public static final String TOTP = "TOTP"; - public static final String CLIENT_CERT = "CLIENT_CERT"; - public static final String CALLER_PRINCIPAL = "CALLER_PRINCIPAL"; - protected String type; - protected boolean input; - protected boolean secret; - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public boolean isInput() { - return input; - } - - public void setInput(boolean input) { - this.input = input; - } - - public boolean isSecret() { - return secret; - } - - public void setSecret(boolean secret) { - this.secret = secret; - } -} diff --git a/core/src/main/java/org/keycloak/representations/idm/ResourceRepresentation.java b/core/src/main/java/org/keycloak/representations/idm/ResourceRepresentation.java index 6cf9de6a79..2f4596e4fd 100755 --- a/core/src/main/java/org/keycloak/representations/idm/ResourceRepresentation.java +++ b/core/src/main/java/org/keycloak/representations/idm/ResourceRepresentation.java @@ -123,12 +123,11 @@ public class ResourceRepresentation { this.credentials = credentials; } - public ResourceRepresentation credential(String type, String value, boolean hashed) { + public ResourceRepresentation credential(String type, String value) { if (this.credentials == null) credentials = new ArrayList(); CredentialRepresentation cred = new CredentialRepresentation(); cred.setType(type); cred.setValue(value); - cred.setHashed(hashed); credentials.add(cred); return this; } diff --git a/core/src/main/java/org/keycloak/representations/idm/UserRepresentation.java b/core/src/main/java/org/keycloak/representations/idm/UserRepresentation.java index cbbff891cb..2b3d02cf87 100755 --- a/core/src/main/java/org/keycloak/representations/idm/UserRepresentation.java +++ b/core/src/main/java/org/keycloak/representations/idm/UserRepresentation.java @@ -14,6 +14,9 @@ public class UserRepresentation { protected String self; // link protected String username; protected boolean enabled; + protected String firstName; + protected String lastName; + protected String email; protected Map attributes; protected List credentials; @@ -25,6 +28,30 @@ public class UserRepresentation { this.self = self; } + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + public String getUsername() { return username; } @@ -55,12 +82,11 @@ public class UserRepresentation { this.credentials = credentials; } - public UserRepresentation credential(String type, String value, boolean hashed) { + public UserRepresentation credential(String type, String value) { if (this.credentials == null) credentials = new ArrayList(); CredentialRepresentation cred = new CredentialRepresentation(); cred.setType(type); cred.setValue(value); - cred.setHashed(hashed); credentials.add(cred); return this; } 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 b333aab903..63f93fcab0 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 @@ -1,94 +1,86 @@ { - "realm" : "demo", - "enabled" : true, - "tokenLifespan" : 10, - "accessCodeLifespan" : 10, - "sslNotRequired" : true, - "cookieLoginAllowed" : true, - "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" : [ + "realm": "demo", + "enabled": true, + "tokenLifespan": 300, + "accessCodeLifespan": 10, + "sslNotRequired": true, + "cookieLoginAllowed": true, + "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" ], + "requiredResourceCredentials": [ "password" ], + "requiredOAuthClientCredentials": [ "password" ], + "users" : [ { - "type" : "Password", - "input" : true, - "secret" : true - } - ], - "requiredResourceCredentials" : [ - { - "type" : "Password", - "input" : true, - "secret" : true - } - ], - "requiredOAuthClientCredentials" : [ - { - "type" : "Password", - "input" : true, - "secret" : true - } - ], - "users" : [ - { "username" : "bburke@redhat.com", "enabled" : true, "attributes" : { "email" : "bburke@redhat.com" }, "credentials" : [ - { "type" : "Password", - "value" : "password" } + { "type" : "password", + "value" : "password" } ] - }, - { + }, + { "username" : "third-party", "enabled" : true, "credentials" : [ - { "type" : "Password", - "value" : "password" } + { "type" : "password", + "value" : "password" } ] - } - ], - "roles" : [ - { "name" : "user", "description" : "Have User privileges" }, - { "name" : "admin", "description" : "Have Administrator privileges" } - ], - "roleMappings" : [ - { - "username" : "bburke@redhat.com", - "roles" : ["user"] - }, - { - "username" : "third-party", - "roles" : ["KEYCLOAK_IDENTITY_REQUESTER"] - } - ], - "scopeMappings" : [ - { - "username" : "third-party", - "roles" : ["user"] - } - ], - "resources" : [ - { - "name" : "customer-portal", - "enabled" : true, - "adminUrl" : "http://localhost:8080/customer-portal/j_admin_request", - "useRealmMappings" : true, - "credentials" : [ - { "type" : "Password", - "value" : "password" } - ] - }, - { - "name" : "product-portal", - "enabled" : true, - "adminUrl" : "http://localhost:8080/product-portal/j_admin_request", - "useRealmMappings" : true, - "credentials" : [ - { "type" : "Password", - "value" : "password" } - ] - } - ] + } + ], + "roles": [ + { + "name": "user", + "description": "Have User privileges" + }, + { + "name": "admin", + "description": "Have Administrator privileges" + } + ], + "roleMappings": [ + { + "username": "bburke@redhat.com", + "roles": ["user"] + }, + { + "username": "third-party", + "roles": ["KEYCLOAK_IDENTITY_REQUESTER"] + } + ], + "scopeMappings": [ + { + "username": "third-party", + "roles": ["user"] + } + ], + "resources": [ + { + "name": "customer-portal", + "enabled": true, + "adminUrl": "http://localhost:8080/customer-portal/j_admin_request", + "useRealmMappings": true, + "credentials": [ + { + "type": "password", + "value": "password" + } + ] + }, + { + "name": "product-portal", + "enabled": true, + "adminUrl": "http://localhost:8080/product-portal/j_admin_request", + "useRealmMappings": true, + "credentials": [ + { + "type": "password", + "value": "password" + } + ] + } + ] } \ No newline at end of file diff --git a/examples/as7-eap-demo/server/src/main/webapp/saas/admin/index.html b/examples/as7-eap-demo/server/src/main/webapp/saas/admin/index.html index d792b3013e..ad1a87e78f 100755 --- a/examples/as7-eap-demo/server/src/main/webapp/saas/admin/index.html +++ b/examples/as7-eap-demo/server/src/main/webapp/saas/admin/index.html @@ -15,13 +15,20 @@ + + + + + + + @@ -57,9 +64,6 @@ - - -