From c942a8ac4fd3e78eefc2d79e188f39c953087c32 Mon Sep 17 00:00:00 2001 From: mposolda Date: Thu, 23 Apr 2015 15:24:58 +0200 Subject: [PATCH] KEYCLOAK-1070 ClientModel.setName/getName --- .../META-INF/jpa-changelog-1.2.0.RC1.xml | 4 +- .../idm/ClientRepresentation.java | 9 ++++ .../exportimport/util/ImportUtils.java | 2 + .../freemarker/FreeMarkerAccountProvider.java | 4 +- .../{AccessBean.java => ConsentBean.java} | 50 ++++++++++++++++--- .../account/{access.ftl => applications.ftl} | 16 +++--- .../account/messages/messages_de.properties | 24 +++++++++ .../account/messages/messages_en.properties | 5 +- .../account/messages/messages_it.properties | 24 +++++++++ .../messages/messages_pt_BR.properties | 24 +++++++++ .../resources/partials/client-detail.html | 10 +++- .../theme/base/login/login-oauth-grant.ftl | 8 +-- .../login/messages/messages_de.properties | 4 +- .../login/messages/messages_en.properties | 9 ++-- .../login/messages/messages_it.properties | 4 +- .../login/messages/messages_pt_BR.properties | 4 +- .../login/freemarker/model/ClientBean.java | 4 ++ .../freemarker/model/OAuthGrantBean.java | 50 +++++++++++++++++-- .../java/org/keycloak/models/ClientModel.java | 4 ++ .../java/org/keycloak/models/RealmModel.java | 1 + .../models/entities/ClientEntity.java | 9 ++++ .../models/utils/ModelToRepresentation.java | 1 + .../models/utils/RepresentationToModel.java | 2 + .../models/file/adapter/ClientAdapter.java | 10 ++++ .../keycloak/models/cache/ClientAdapter.java | 14 +++++- .../models/cache/entities/CachedClient.java | 8 ++- .../keycloak/models/jpa/ClientAdapter.java | 10 ++++ .../models/jpa/entities/ClientEntity.java | 10 ++++ .../keycloak/adapters/ClientAdapter.java | 27 +++++++--- .../services/managers/RealmManager.java | 3 ++ .../testsuite/admin/AdminAPITest.java | 1 + .../testsuite/model/ClientModelTest.java | 2 + .../keycloak/testsuite/model/ImportTest.java | 1 + .../testsuite/oauth/OAuthGrantTest.java | 10 ++++ ...Page.java => AccountApplicationsPage.java} | 4 +- .../src/test/resources/model/testrealm.json | 8 +-- 36 files changed, 330 insertions(+), 50 deletions(-) rename forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/{AccessBean.java => ConsentBean.java} (58%) rename forms/common-themes/src/main/resources/theme/base/account/{access.ftl => applications.ftl} (69%) rename testsuite/integration/src/test/java/org/keycloak/testsuite/pages/{AccountAccessPage.java => AccountApplicationsPage.java} (93%) diff --git a/connections/jpa-liquibase/src/main/resources/META-INF/jpa-changelog-1.2.0.RC1.xml b/connections/jpa-liquibase/src/main/resources/META-INF/jpa-changelog-1.2.0.RC1.xml index bc808bcad8..f435ffc945 100755 --- a/connections/jpa-liquibase/src/main/resources/META-INF/jpa-changelog-1.2.0.RC1.xml +++ b/connections/jpa-liquibase/src/main/resources/META-INF/jpa-changelog-1.2.0.RC1.xml @@ -83,17 +83,19 @@ + + DTYPE = 'OAuthClientEntity' - + diff --git a/core/src/main/java/org/keycloak/representations/idm/ClientRepresentation.java b/core/src/main/java/org/keycloak/representations/idm/ClientRepresentation.java index de40f101ca..41371965e0 100755 --- a/core/src/main/java/org/keycloak/representations/idm/ClientRepresentation.java +++ b/core/src/main/java/org/keycloak/representations/idm/ClientRepresentation.java @@ -10,6 +10,7 @@ import java.util.Map; public class ClientRepresentation { protected String id; protected String clientId; + protected String name; protected String adminUrl; protected String baseUrl; protected Boolean surrogateAuthRequired; @@ -40,6 +41,14 @@ public class ClientRepresentation { this.id = id; } + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + public String getClientId() { return clientId; } diff --git a/export-import/export-import-api/src/main/java/org/keycloak/exportimport/util/ImportUtils.java b/export-import/export-import-api/src/main/java/org/keycloak/exportimport/util/ImportUtils.java index 66b106cc04..fbd909db83 100755 --- a/export-import/export-import-api/src/main/java/org/keycloak/exportimport/util/ImportUtils.java +++ b/export-import/export-import-api/src/main/java/org/keycloak/exportimport/util/ImportUtils.java @@ -120,6 +120,8 @@ public class ImportUtils { adminRole.setDescription("${role_"+AdminRoles.ADMIN+"}"); ClientModel realmAdminApp = KeycloakModelUtils.createClient(adminRealm, KeycloakModelUtils.getMasterRealmAdminApplicationClientId(realm)); + // No localized name for now + realmAdminApp.setName(realm.getName() + " Realm"); realmAdminApp.setBearerOnly(true); realm.setMasterAdminClient(realmAdminApp); diff --git a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/FreeMarkerAccountProvider.java b/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/FreeMarkerAccountProvider.java index ba9534837b..b7215034f2 100755 --- a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/FreeMarkerAccountProvider.java +++ b/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/FreeMarkerAccountProvider.java @@ -20,7 +20,7 @@ import javax.ws.rs.core.UriInfo; import org.jboss.logging.Logger; import org.keycloak.account.AccountPages; import org.keycloak.account.AccountProvider; -import org.keycloak.account.freemarker.model.AccessBean; +import org.keycloak.account.freemarker.model.ConsentBean; import org.keycloak.account.freemarker.model.AccountBean; import org.keycloak.account.freemarker.model.AccountFederatedIdentityBean; import org.keycloak.account.freemarker.model.FeaturesBean; @@ -186,7 +186,7 @@ public class FreeMarkerAccountProvider implements AccountProvider { attributes.put("sessions", new SessionsBean(realm, sessions)); break; case ACCESS: - attributes.put("access", new AccessBean(realm, user, uriInfo.getBaseUri(), stateChecker)); + attributes.put("consent", new ConsentBean(user)); attributes.put("advancedMsg", new AdvancedMessageFormatterMethod(locale, messagesBundle)); break; case PASSWORD: diff --git a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/AccessBean.java b/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/ConsentBean.java similarity index 58% rename from forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/AccessBean.java rename to forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/ConsentBean.java index 67eb4a68b4..ee4c6e06da 100644 --- a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/AccessBean.java +++ b/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/ConsentBean.java @@ -1,6 +1,5 @@ package org.keycloak.account.freemarker.model; -import java.net.URI; import java.util.LinkedList; import java.util.List; @@ -15,22 +14,25 @@ import org.keycloak.util.MultivaluedHashMap; /** * @author Marek Posolda */ -public class AccessBean { +public class ConsentBean { private List clientGrants = new LinkedList(); - public AccessBean(RealmModel realm, UserModel user, URI baseUri, String stateChecker) { + public ConsentBean(UserModel user) { List grantedConsents = user.getConsents(); for (UserConsentModel consent : grantedConsents) { ClientModel client = consent.getClient(); List realmRolesGranted = new LinkedList(); - MultivaluedHashMap resourceRolesGranted = new MultivaluedHashMap(); + MultivaluedHashMap resourceRolesGranted = new MultivaluedHashMap(); for (RoleModel role : consent.getGrantedRoles()) { if (role.getContainer() instanceof RealmModel) { realmRolesGranted.add(role); } else { - resourceRolesGranted.add(((ClientModel) role.getContainer()).getClientId(), role); + ClientModel currentClient = (ClientModel) role.getContainer(); + ClientRoleEntry clientRole = new ClientRoleEntry(currentClient.getClientId(), currentClient.getName(), + role.getName(), role.getDescription()); + resourceRolesGranted.add(currentClient.getClientId(), clientRole); } } @@ -51,11 +53,11 @@ public class AccessBean { public static class ClientGrantBean { private final List realmRolesGranted; - private final MultivaluedHashMap resourceRolesGranted; + private final MultivaluedHashMap resourceRolesGranted; private final ClientModel client; private final List claimsGranted; - public ClientGrantBean(List realmRolesGranted, MultivaluedHashMap resourceRolesGranted, + public ClientGrantBean(List realmRolesGranted, MultivaluedHashMap resourceRolesGranted, ClientModel client, List claimsGranted) { this.realmRolesGranted = realmRolesGranted; this.resourceRolesGranted = resourceRolesGranted; @@ -67,7 +69,7 @@ public class AccessBean { return realmRolesGranted; } - public MultivaluedHashMap getResourceRolesGranted() { + public MultivaluedHashMap getResourceRolesGranted() { return resourceRolesGranted; } @@ -80,4 +82,36 @@ public class AccessBean { } } + + // Same class used in OAuthGrantBean as well. Maybe should be merged into common-freemarker... + public static class ClientRoleEntry { + + private final String clientId; + private final String clientName; + private final String roleName; + private final String roleDescription; + + public ClientRoleEntry(String clientId, String clientName, String roleName, String roleDescription) { + this.clientId = clientId; + this.clientName = clientName; + this.roleName = roleName; + this.roleDescription = roleDescription; + } + + public String getClientId() { + return clientId; + } + + public String getClientName() { + return clientName; + } + + public String getRoleName() { + return roleName; + } + + public String getRoleDescription() { + return roleDescription; + } + } } diff --git a/forms/common-themes/src/main/resources/theme/base/account/access.ftl b/forms/common-themes/src/main/resources/theme/base/account/applications.ftl similarity index 69% rename from forms/common-themes/src/main/resources/theme/base/account/access.ftl rename to forms/common-themes/src/main/resources/theme/base/account/applications.ftl index dc3cc4141a..fa89ba643a 100755 --- a/forms/common-themes/src/main/resources/theme/base/account/access.ftl +++ b/forms/common-themes/src/main/resources/theme/base/account/applications.ftl @@ -21,9 +21,13 @@ - <#list access.clientGrants as clientGrant> + <#list consent.clientGrants as clientGrant> - <#if clientGrant.client.baseUrl??>${clientGrant.client.clientId}<#else>${clientGrant.client.clientId} + + <#if clientGrant.client.baseUrl??> + <#if clientGrant.client.name??>${advancedMsg(clientGrant.client.name)}<#else>${clientGrant.client.clientId} + <#if clientGrant.client.baseUrl??> + <#list clientGrant.claimsGranted as claim> ${advancedMsg(claim)}<#if claim_has_next>, @@ -36,10 +40,10 @@ <#list clientGrant.resourceRolesGranted?keys as resource> <#if clientGrant.realmRolesGranted?has_content>, - <#list clientGrant.resourceRolesGranted[resource] as role> - <#if role.description??>${advancedMsg(role.description)}<#else>${advancedMsg(role.name)} - ${msg("inResource", resource)} - <#if role_has_next>, + <#list clientGrant.resourceRolesGranted[resource] as clientRole> + <#if clientRole.roleDescription??>${advancedMsg(clientRole.roleDescription)}<#else>${advancedMsg(clientRole.roleName)} + ${msg("inResource")} <#if clientRole.clientName??>${advancedMsg(clientRole.clientName)}<#else>${clientRole.clientId} + <#if clientRole_has_next>, diff --git a/forms/common-themes/src/main/resources/theme/base/account/messages/messages_de.properties b/forms/common-themes/src/main/resources/theme/base/account/messages/messages_de.properties index a846d541bc..80fb02fab8 100644 --- a/forms/common-themes/src/main/resources/theme/base/account/messages/messages_de.properties +++ b/forms/common-themes/src/main/resources/theme/base/account/messages/messages_de.properties @@ -16,16 +16,40 @@ authenticatorTitle=Authenticator authenticatorCode=One-time code email=E-Mail firstName=Vorname +givenName=Vorname +fullName=voller Name lastName=Nachname +familyName=Nachname password=Passwort passwordConfirm=Passwortbest\u00E4tigung passwordNew=Neues Passwort username=Benutzernamen +address=Adresse street=Strasse region=Staat, Provinz, Region postal_code=PLZ locality=Stadt oder Ortschaft country=Land +emailVerified=E-Mail verifiziert +gssDelegationCredential=GSS delegierte Berechtigung + +role_admin=Admin +role_realm-admin=Realm Admin +role_create-realm=Realm erstellen +role_view-realm=Realm ansehen +role_view-users=Benutzer ansehen +role_view-applications=Applicationen ansehen +role_view-clients=Clients ansehen +role_view-events=Events ansehen +role_view-identity-providers=Identity Providers ansehen +role_manage-realm=Realm verwalten +role_manage-users=Benutzer verwalten +role_manage-applications=Applikationen verwalten +role_manage-identity-providers=Identity Provider verwalten +role_manage-clients=Clients verwalten +role_manage-events=Events verwalten +role_view-profile=Profile ansehen +role_manage-account=Profile verwalten requiredFields=Erforderliche Felder allFieldsRequired=Alle Felder sind Erforderlich diff --git a/forms/common-themes/src/main/resources/theme/base/account/messages/messages_en.properties b/forms/common-themes/src/main/resources/theme/base/account/messages/messages_en.properties index d0bbb37d18..617948313e 100755 --- a/forms/common-themes/src/main/resources/theme/base/account/messages/messages_en.properties +++ b/forms/common-themes/src/main/resources/theme/base/account/messages/messages_en.properties @@ -50,6 +50,9 @@ role_manage-identity-providers=Manage identity providers role_manage-clients=Manage clients role_manage-events=Manage events role_view-profile=View profile +client_account=Account +client_security-admin-console=Security Admin Console +client_realm-management=Realm Management requiredFields=Required fields @@ -79,7 +82,7 @@ access=Access grantedPersonalInfo=Granted Personal Info grantedPermissions=Granted Permissions action=Action -inResource=in {0} +inResource=in revoke=Revoke Access configureAuthenticators=Configured Authenticators diff --git a/forms/common-themes/src/main/resources/theme/base/account/messages/messages_it.properties b/forms/common-themes/src/main/resources/theme/base/account/messages/messages_it.properties index d22b935351..99eff0c090 100755 --- a/forms/common-themes/src/main/resources/theme/base/account/messages/messages_it.properties +++ b/forms/common-themes/src/main/resources/theme/base/account/messages/messages_it.properties @@ -16,16 +16,40 @@ authenticatorTitle=Authenticator authenticatorCode=Codice One-time email=Email firstName=Nome +givenName=Nome +fullName=Nome Completo lastName=Cognome +familyName=Cognome password=Password passwordConfirm=Conferma Password passwordNew=Nuova Password username=Username +address=Indirizzo street=Via locality=Citta'' o Localita'' region=Stato, Provincia, o Regione postal_code=Cap country=Paese +emailVerified=Email verificata +gssDelegationCredential=credenziali gss delegation + +role_admin=Admin +role_realm-admin=Realm Admin +role_create-realm=Crea realm +role_view-realm=Visualizza realm +role_view-users=Visualizza utenti +role_view-applications=Visualizza applicazioni +role_view-clients=Visualizza client +role_view-events=Visualizza eventi +role_view-identity-providers=Visualizza identity provider +role_manage-realm=Gestisci realm +role_manage-users=Gestisci utenti +role_manage-applications=Gestisci applicazioni +role_manage-identity-providers=Gestisci identity provider +role_manage-clients=Gestisci client +role_manage-events=Gestisci eventi +role_view-profile=Visualizza profilo +role_manage-account=Gestisci account requiredFields=Campi obbligatori allFieldsRequired=Tutti campi obbligatori diff --git a/forms/common-themes/src/main/resources/theme/base/account/messages/messages_pt_BR.properties b/forms/common-themes/src/main/resources/theme/base/account/messages/messages_pt_BR.properties index 367be5f383..a29d60d799 100644 --- a/forms/common-themes/src/main/resources/theme/base/account/messages/messages_pt_BR.properties +++ b/forms/common-themes/src/main/resources/theme/base/account/messages/messages_pt_BR.properties @@ -16,16 +16,40 @@ authenticatorTitle=Autenticator authenticatorCode=C\u00F3digo autenticador email=Email firstName=Primeiro nome +givenName=Primeiro nome +fullName=Nome completo lastName=Sobrenome +familyName=Sobrenome password=Senha passwordConfirm=Confirma\u00E7\u00E3o passwordNew=Nova senha username=Nome de us\u00FAario +address=Endere\u00E7o street=Logradouro locality=Cidade ou Localidade region=Estado postal_code=CEP country=Pa\u00EDs +emailVerified=Email verificado +gssDelegationCredential=gss delega\u00E7\u00E3o credencial + +role_admin=Admin +role_realm-admin=Realm Admin +role_create-realm=Cria realm +role_view-realm=Visualiza realm +role_view-users=Visualiza usu\u00E1rios +role_view-applications=Visualiza aplica\u00E7\u00F5es +role_view-clients=Visualiza clientes +role_view-events=Visualiza eventos +role_view-identity-providers=Visualiza provedores de identidade +role_manage-realm=Gerencia realm +role_manage-users=Gerencia usu\u00E1rios +role_manage-applications=Gerencia aplica\u00E7\u00F5es +role_manage-identity-providers=Gerencia provedores de identidade +role_manage-clients=Gerencia clientes +role_manage-events=Gerencia eventos +role_view-profile=Visualiza perfil +role_manage-account=Gerencia contas requiredFields=Campos obrigat\u00F3rios allFieldsRequired=Todos os campos s\u00E3o obrigat\u00F3rios diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/client-detail.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/client-detail.html index ebfca94936..69dd012a65 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/client-detail.html +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/client-detail.html @@ -19,9 +19,17 @@
-
+
+ +
+
+ +
+ +
+
diff --git a/forms/common-themes/src/main/resources/theme/base/login/login-oauth-grant.ftl b/forms/common-themes/src/main/resources/theme/base/login/login-oauth-grant.ftl index 6136e8b033..30d55c3568 100755 --- a/forms/common-themes/src/main/resources/theme/base/login/login-oauth-grant.ftl +++ b/forms/common-themes/src/main/resources/theme/base/login/login-oauth-grant.ftl @@ -3,7 +3,7 @@ <#if section = "title"> ${msg("oauthGrantTitle")} <#elseif section = "header"> - ${msg("oauthGrantTitleHtml",(realm.name!''), (client.clientId!''))} + ${msg("oauthGrantTitleHtml",(realm.name!''))} <#if client.name??>${advancedMsg(client.name)}<#else>${client.clientId}. <#elseif section = "form">

${msg("oauthGrantRequest")}

@@ -34,10 +34,10 @@ <#if oauth.resourceRolesRequested??> <#list oauth.resourceRolesRequested?keys as resource> - <#list oauth.resourceRolesRequested[resource] as role> + <#list oauth.resourceRolesRequested[resource] as clientRole>
  • - <#if role.description??>${advancedMsg(role.description)}<#else>${advancedMsg(role.name)} - ${msg("inResource", resource)} + <#if clientRole.roleDescription??>${advancedMsg(clientRole.roleDescription)}<#else>${advancedMsg(clientRole.roleName)} + ${msg("inResource")} <#if clientRole.clientName??>${advancedMsg(clientRole.clientName)}<#else>${clientRole.clientId}
  • diff --git a/forms/common-themes/src/main/resources/theme/base/login/messages/messages_de.properties b/forms/common-themes/src/main/resources/theme/base/login/messages/messages_de.properties index ca45f53821..5999681766 100644 --- a/forms/common-themes/src/main/resources/theme/base/login/messages/messages_de.properties +++ b/forms/common-themes/src/main/resources/theme/base/login/messages/messages_de.properties @@ -16,7 +16,7 @@ loginOauthTitleHtml=Tempor\u00E4rer zugriff auf {0} angefordert loginTotpTitle=Mobile Authentifizierung Einrichten loginProfileTitle=Benutzerkonto Informationen aktualisieren oauthGrantTitle=OAuth gew\u00E4hren -oauthGrantTitleHtml=Tempor\u00E4rer zugriff auf {0} angefordert von {1}. +oauthGrantTitleHtml=Tempor\u00E4rer zugriff auf {0} angefordert von errorTitle=Es tut uns leid... errorTitleHtml=Es tut uns leid... emailVerifyTitle=E-Mail verifizieren @@ -55,7 +55,7 @@ loginTotpStep3=Geben Sie den One-time Code welcher die Applikation generiert hat loginTotpOneTime=One-time Code oauthGrantRequest=Wollen Sie diese Zugriffsreche gew\u00E4hren? -inResource=in {0} +inResource=in emailVerifyInstruction1=Ein E-Mail mit weitern Anweisungen wurde an Sie versendet. emailVerifyInstruction2=Falls Sie kein E-Mail erhalten haben, dann k\u00F6nnen Sie diff --git a/forms/common-themes/src/main/resources/theme/base/login/messages/messages_en.properties b/forms/common-themes/src/main/resources/theme/base/login/messages/messages_en.properties index 006883fa5f..a1f76eee6b 100755 --- a/forms/common-themes/src/main/resources/theme/base/login/messages/messages_en.properties +++ b/forms/common-themes/src/main/resources/theme/base/login/messages/messages_en.properties @@ -14,7 +14,7 @@ loginTitleHtml=Log in to {0} loginTotpTitle=Mobile Authenticator Setup loginProfileTitle=Update Account Information oauthGrantTitle=OAuth Grant -oauthGrantTitleHtml=Temporary access for {0} requested by {1}. +oauthGrantTitleHtml=Temporary access for {0} requested by errorTitle=We''re sorry... errorTitleHtml=We''re sorry ... emailVerifyTitle=Email verification @@ -45,7 +45,7 @@ region=State, Province, or Region postal_code=Zip or Postal code country=Country emailVerified=Email verified -gssDelegationCredential=gss delegation credential +gssDelegationCredential=GSS Delegation Credential loginTotpStep1=Install FreeOTP or Google Authenticator on your mobile. Both applications are available in Google Play and Apple App Store. loginTotpStep2=Open the application and scan the barcode or enter the key @@ -53,7 +53,7 @@ loginTotpStep3=Enter the one-time code provided by the application and click Sub loginTotpOneTime=One-time code oauthGrantRequest=Do you grant these access privileges? -inResource=in {0} +inResource=in emailVerifyInstruction1=An email with instructions to verify your email address has been sent to you. emailVerifyInstruction2=Haven''t received a verification code in your email? @@ -84,6 +84,9 @@ role_manage-clients=Manage clients role_manage-events=Manage events role_view-profile=View profile role_manage-account=Manage account +client_account=Account +client_security-admin-console=Security Admin Console +client_realm-management=Realm Management invalidUserMessage=Invalid username or password. invalidEmailMessage=Invalid email address. diff --git a/forms/common-themes/src/main/resources/theme/base/login/messages/messages_it.properties b/forms/common-themes/src/main/resources/theme/base/login/messages/messages_it.properties index f7296b95db..b019d6cdd0 100755 --- a/forms/common-themes/src/main/resources/theme/base/login/messages/messages_it.properties +++ b/forms/common-themes/src/main/resources/theme/base/login/messages/messages_it.properties @@ -14,7 +14,7 @@ loginTitleHtml=Accedi a {0} loginTotpTitle=Configura Autenticazione Mobile loginProfileTitle=Aggiorna Profilo oauthGrantTitle=OAuth Grant -oauthGrantTitleHtml=Accesso temporaneo per {0} richiesto da {1}. +oauthGrantTitleHtml=Accesso temporaneo per {0} richiesto da errorTitle=Siamo spiacenti... errorTitleHtml=Siamo spiacenti ... emailVerifyTitle=Verifica Email @@ -53,7 +53,7 @@ loginTotpStep3=Scrivi il codice one-time fornito dall''applicazione e premi Invi loginTotpOneTime=Codice one-time oauthGrantRequest=Vuoi assegnare questi privilegi di accesso? -inResource=per {0} +inResource=per emailVerifyInstruction1=Ti e'' stata inviata una email con le istruzioni per la verifica della tua email. emailVerifyInstruction2=Non hai ricevuto un codice di verifica nella tua email? diff --git a/forms/common-themes/src/main/resources/theme/base/login/messages/messages_pt_BR.properties b/forms/common-themes/src/main/resources/theme/base/login/messages/messages_pt_BR.properties index 896f83f5c1..8d50d3e297 100644 --- a/forms/common-themes/src/main/resources/theme/base/login/messages/messages_pt_BR.properties +++ b/forms/common-themes/src/main/resources/theme/base/login/messages/messages_pt_BR.properties @@ -14,7 +14,7 @@ loginTitleHtml=Entrar em {0} loginTotpTitle=Configura\u00E7\u00E3o do autenticador mobile loginProfileTitle=Atualiza\u00E7\u00E3o de Informa\u00E7\u00F5es da Conta oauthGrantTitle=Concess\u00E3o OAuth -oauthGrantTitleHtml=Acesso tempor\u00E1rio para {0} solicitado pela {1}. +oauthGrantTitleHtml=Acesso tempor\u00E1rio para {0} solicitado pela errorTitle=N\u00F3s lamentamos... errorTitleHtml=N\u00F3s lamentamos ... emailVerifyTitle=Verifica\u00E7\u00E3o de e-mail @@ -53,7 +53,7 @@ loginTotpStep3=Digite o c\u00F3digo fornecido pelo aplicativo e clique em Enviar loginTotpOneTime=C\u00F3digo autenticador oauthGrantRequest=Voc\u00EA concede esses privil\u00E9gios de acesso? -inResource=em {0} +inResource=em emailVerifyInstruction1=Um e-mail com instru\u00E7\u00F5es para verificar o seu endere\u00E7o de e-mail foi enviado para voc\u00EA. emailVerifyInstruction2=Voc\u00EA n\u00E3o recebeu um c\u00F3digo de verifica\u00E7\u00E3o em seu e-mail? diff --git a/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/model/ClientBean.java b/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/model/ClientBean.java index 53f7937106..d945c38db8 100755 --- a/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/model/ClientBean.java +++ b/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/model/ClientBean.java @@ -18,6 +18,10 @@ public class ClientBean { return client.getClientId(); } + public String getName() { + return client.getName(); + } + public String getBaseUrl() { return client.getBaseUrl(); } diff --git a/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/model/OAuthGrantBean.java b/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/model/OAuthGrantBean.java index 98cd164889..6032587627 100755 --- a/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/model/OAuthGrantBean.java +++ b/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/model/OAuthGrantBean.java @@ -21,6 +21,7 @@ */ package org.keycloak.login.freemarker.model; +import org.jboss.resteasy.specimpl.MultivaluedMapImpl; import org.keycloak.models.ClientModel; import org.keycloak.models.ClientSessionModel; import org.keycloak.models.ProtocolMapperModel; @@ -29,6 +30,7 @@ import org.keycloak.models.RoleModel; import javax.ws.rs.core.MultivaluedMap; import java.util.LinkedList; import java.util.List; +import java.util.Map; /** * @author Viliam Rockai @@ -37,7 +39,7 @@ public class OAuthGrantBean { private final String accessRequestMessage; private List realmRolesRequested; - private MultivaluedMap resourceRolesRequested; + private MultivaluedMap resourceRolesRequested; private String code; private ClientModel client; private List claimsRequested; @@ -47,7 +49,17 @@ public class OAuthGrantBean { this.code = code; this.client = client; this.realmRolesRequested = realmRolesRequested; - this.resourceRolesRequested = resourceRolesRequested; + if (resourceRolesRequested != null) { + this.resourceRolesRequested = new MultivaluedMapImpl(); + for (List clientRoles : resourceRolesRequested.values()) { + for (RoleModel role : clientRoles) { + ClientModel currentClient = (ClientModel) role.getContainer(); + ClientRoleEntry roleEntry = new ClientRoleEntry(currentClient.getClientId(), currentClient.getName(), role.getName(), role.getDescription()); + this.resourceRolesRequested.add(currentClient.getClientId(), roleEntry); + } + } + } + this.accessRequestMessage = accessRequestMessage; List claims = new LinkedList(); @@ -63,7 +75,7 @@ public class OAuthGrantBean { return code; } - public MultivaluedMap getResourceRolesRequested() { + public MultivaluedMap getResourceRolesRequested() { return resourceRolesRequested; } @@ -82,4 +94,36 @@ public class OAuthGrantBean { public String getAccessRequestMessage() { return this.accessRequestMessage; } + + // Same class used in ConsentBean in account as well. Maybe should be merged into common-freemarker... + public static class ClientRoleEntry { + + private final String clientId; + private final String clientName; + private final String roleName; + private final String roleDescription; + + public ClientRoleEntry(String clientId, String clientName, String roleName, String roleDescription) { + this.clientId = clientId; + this.clientName = clientName; + this.roleName = roleName; + this.roleDescription = roleDescription; + } + + public String getClientId() { + return clientId; + } + + public String getClientName() { + return clientName; + } + + public String getRoleName() { + return roleName; + } + + public String getRoleDescription() { + return roleDescription; + } + } } diff --git a/model/api/src/main/java/org/keycloak/models/ClientModel.java b/model/api/src/main/java/org/keycloak/models/ClientModel.java index 2382f55f79..5fae169b3f 100755 --- a/model/api/src/main/java/org/keycloak/models/ClientModel.java +++ b/model/api/src/main/java/org/keycloak/models/ClientModel.java @@ -24,6 +24,10 @@ public interface ClientModel extends RoleContainerModel { void setClientId(String clientId); + String getName(); + + void setName(String name); + boolean isEnabled(); void setEnabled(boolean enabled); diff --git a/model/api/src/main/java/org/keycloak/models/RealmModel.java b/model/api/src/main/java/org/keycloak/models/RealmModel.java index 17c88ea76e..9c2960424b 100755 --- a/model/api/src/main/java/org/keycloak/models/RealmModel.java +++ b/model/api/src/main/java/org/keycloak/models/RealmModel.java @@ -145,6 +145,7 @@ public interface RealmModel extends RoleContainerModel { void updateDefaultRoles(String[] defaultRoles); + // Key is clientId Map getClientNameMap(); List getClients(); diff --git a/model/api/src/main/java/org/keycloak/models/entities/ClientEntity.java b/model/api/src/main/java/org/keycloak/models/entities/ClientEntity.java index 699c6d6244..513c4ef831 100644 --- a/model/api/src/main/java/org/keycloak/models/entities/ClientEntity.java +++ b/model/api/src/main/java/org/keycloak/models/entities/ClientEntity.java @@ -11,6 +11,7 @@ import java.util.Map; public class ClientEntity extends AbstractIdentifiableEntity { private String clientId; + private String name; private String realmId; private boolean enabled; private String secret; @@ -49,6 +50,14 @@ public class ClientEntity extends AbstractIdentifiableEntity { this.clientId = clientId; } + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + public boolean isEnabled() { return enabled; } diff --git a/model/api/src/main/java/org/keycloak/models/utils/ModelToRepresentation.java b/model/api/src/main/java/org/keycloak/models/utils/ModelToRepresentation.java index 63be7f03ab..e10cbed99a 100755 --- a/model/api/src/main/java/org/keycloak/models/utils/ModelToRepresentation.java +++ b/model/api/src/main/java/org/keycloak/models/utils/ModelToRepresentation.java @@ -226,6 +226,7 @@ public class ModelToRepresentation { ClientRepresentation rep = new ClientRepresentation(); rep.setId(clientModel.getId()); rep.setClientId(clientModel.getClientId()); + rep.setName(clientModel.getName()); rep.setEnabled(clientModel.isEnabled()); rep.setAdminUrl(clientModel.getManagementUrl()); rep.setPublicClient(clientModel.isPublicClient()); diff --git a/model/api/src/main/java/org/keycloak/models/utils/RepresentationToModel.java b/model/api/src/main/java/org/keycloak/models/utils/RepresentationToModel.java index 704361117f..d5983cdac0 100755 --- a/model/api/src/main/java/org/keycloak/models/utils/RepresentationToModel.java +++ b/model/api/src/main/java/org/keycloak/models/utils/RepresentationToModel.java @@ -523,6 +523,7 @@ public class RepresentationToModel { logger.debug("Create client: {0}" + resourceRep.getClientId()); ClientModel client = resourceRep.getId()!=null ? realm.addClient(resourceRep.getId(), resourceRep.getClientId()) : realm.addClient(resourceRep.getClientId()); + if (resourceRep.getName() != null) client.setName(resourceRep.getName()); if (resourceRep.isEnabled() != null) client.setEnabled(resourceRep.isEnabled()); client.setManagementUrl(resourceRep.getAdminUrl()); if (resourceRep.isSurrogateAuthRequired() != null) @@ -614,6 +615,7 @@ public class RepresentationToModel { public static void updateClient(ClientRepresentation rep, ClientModel resource) { if (rep.getClientId() != null) resource.setClientId(rep.getClientId()); + if (rep.getName() != null) resource.setName(rep.getName()); if (rep.isEnabled() != null) resource.setEnabled(rep.isEnabled()); if (rep.isBearerOnly() != null) resource.setBearerOnly(rep.isBearerOnly()); if (rep.isConsentRequired() != null) resource.setConsentRequired(rep.isConsentRequired()); diff --git a/model/file/src/main/java/org/keycloak/models/file/adapter/ClientAdapter.java b/model/file/src/main/java/org/keycloak/models/file/adapter/ClientAdapter.java index 7068a26cfa..e7847e2931 100755 --- a/model/file/src/main/java/org/keycloak/models/file/adapter/ClientAdapter.java +++ b/model/file/src/main/java/org/keycloak/models/file/adapter/ClientAdapter.java @@ -68,6 +68,16 @@ public class ClientAdapter implements ClientModel { return entity.getId(); } + @Override + public String getName() { + return entity.getName(); + } + + @Override + public void setName(String name) { + entity.setName(name); + } + @Override public Set getWebOrigins() { Set result = new HashSet(); diff --git a/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/ClientAdapter.java b/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/ClientAdapter.java index 4dc4a031b5..48089bd5ca 100755 --- a/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/ClientAdapter.java +++ b/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/ClientAdapter.java @@ -293,7 +293,7 @@ public class ClientAdapter implements ClientModel { @Override public String getClientId() { if (updated != null) return updated.getClientId(); - return cached.getName(); + return cached.getClientId(); } @Override @@ -303,6 +303,18 @@ public class ClientAdapter implements ClientModel { cacheSession.registerRealmInvalidation(cachedRealm.getId()); } + @Override + public String getName() { + if (updated != null) return updated.getName(); + return cached.getName(); + } + + @Override + public void setName(String name) { + getDelegateForUpdate(); + updated.setName(name); + } + @Override public boolean isSurrogateAuthRequired() { if (updated != null) return updated.isSurrogateAuthRequired(); diff --git a/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/entities/CachedClient.java b/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/entities/CachedClient.java index 58d3cb0cd9..8b8c045e07 100755 --- a/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/entities/CachedClient.java +++ b/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/entities/CachedClient.java @@ -21,6 +21,7 @@ import java.util.TreeMap; */ public class CachedClient { private String id; + private String clientId; private String name; private String realm; private Set redirectUris = new HashSet(); @@ -49,7 +50,8 @@ public class CachedClient { public CachedClient(RealmCache cache, RealmProvider delegate, RealmModel realm, ClientModel model) { id = model.getId(); secret = model.getSecret(); - name = model.getClientId(); + clientId = model.getClientId(); + name = model.getName(); this.realm = realm.getId(); enabled = model.isEnabled(); protocol = model.getProtocol(); @@ -85,6 +87,10 @@ public class CachedClient { return id; } + public String getClientId() { + return clientId; + } + public String getName() { return name; } diff --git a/model/jpa/src/main/java/org/keycloak/models/jpa/ClientAdapter.java b/model/jpa/src/main/java/org/keycloak/models/jpa/ClientAdapter.java index b290e48377..7e4906a7f9 100755 --- a/model/jpa/src/main/java/org/keycloak/models/jpa/ClientAdapter.java +++ b/model/jpa/src/main/java/org/keycloak/models/jpa/ClientAdapter.java @@ -54,6 +54,16 @@ public class ClientAdapter implements ClientModel { return realm; } + @Override + public String getName() { + return entity.getName(); + } + + @Override + public void setName(String name) { + entity.setName(name); + } + @Override public boolean isEnabled() { return entity.isEnabled(); diff --git a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/ClientEntity.java b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/ClientEntity.java index 26322d4baa..ff6f14ce0d 100755 --- a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/ClientEntity.java +++ b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/ClientEntity.java @@ -32,6 +32,8 @@ public class ClientEntity { @Id @Column(name="ID", length = 36) private String id; + @Column(name = "NAME") + private String name; @Column(name = "CLIENT_ID") private String clientId; @Column(name="ENABLED") @@ -125,6 +127,14 @@ public class ClientEntity { this.id = id; } + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + public boolean isEnabled() { return enabled; } diff --git a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/ClientAdapter.java b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/ClientAdapter.java index 9eae9f025a..b0784f5e32 100755 --- a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/ClientAdapter.java +++ b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/ClientAdapter.java @@ -27,20 +27,20 @@ import java.util.Set; */ public class ClientAdapter extends AbstractMongoAdapter implements ClientModel { - protected final MongoClientEntity applicationEntity; + protected final MongoClientEntity clientEntity; private final RealmModel realm; protected KeycloakSession session; - public ClientAdapter(KeycloakSession session, RealmModel realm, MongoClientEntity applicationEntity, MongoStoreInvocationContext invContext) { + public ClientAdapter(KeycloakSession session, RealmModel realm, MongoClientEntity clientEntity, MongoStoreInvocationContext invContext) { super(invContext); this.session = session; this.realm = realm; - this.applicationEntity = applicationEntity; + this.clientEntity = clientEntity; } @Override public MongoClientEntity getMongoEntity() { - return applicationEntity; + return clientEntity; } @Override @@ -59,6 +59,17 @@ public class ClientAdapter extends AbstractMongoAdapter imple return getMongoEntity().getClientId(); } + @Override + public String getName() { + return getMongoEntity().getName(); + } + + @Override + public void setName(String name) { + getMongoEntity().setName(name); + updateMongoEntity(); + } + @Override public void setClientId(String clientId) { getMongoEntity().setClientId(clientId); @@ -84,12 +95,12 @@ public class ClientAdapter extends AbstractMongoAdapter imple @Override public void addWebOrigin(String webOrigin) { - getMongoStore().pushItemToList(applicationEntity, "webOrigins", webOrigin, true, invocationContext); + getMongoStore().pushItemToList(clientEntity, "webOrigins", webOrigin, true, invocationContext); } @Override public void removeWebOrigin(String webOrigin) { - getMongoStore().pullItemFromList(applicationEntity, "webOrigins", webOrigin, invocationContext); + getMongoStore().pullItemFromList(clientEntity, "webOrigins", webOrigin, invocationContext); } @Override @@ -111,12 +122,12 @@ public class ClientAdapter extends AbstractMongoAdapter imple @Override public void addRedirectUri(String redirectUri) { - getMongoStore().pushItemToList(applicationEntity, "redirectUris", redirectUri, true, invocationContext); + getMongoStore().pushItemToList(clientEntity, "redirectUris", redirectUri, true, invocationContext); } @Override public void removeRedirectUri(String redirectUri) { - getMongoStore().pullItemFromList(applicationEntity, "redirectUris", redirectUri, invocationContext); + getMongoStore().pullItemFromList(clientEntity, "redirectUris", redirectUri, invocationContext); } @Override diff --git a/services/src/main/java/org/keycloak/services/managers/RealmManager.java b/services/src/main/java/org/keycloak/services/managers/RealmManager.java index 8493397653..3d56a2a643 100755 --- a/services/src/main/java/org/keycloak/services/managers/RealmManager.java +++ b/services/src/main/java/org/keycloak/services/managers/RealmManager.java @@ -94,6 +94,7 @@ public class RealmManager { protected void setupAdminConsole(RealmModel realm) { ClientModel adminConsole = realm.getClientByClientId(Constants.ADMIN_CONSOLE_CLIENT_ID); if (adminConsole == null) adminConsole = new ClientManager(this).createClient(realm, Constants.ADMIN_CONSOLE_CLIENT_ID); + adminConsole.setName("${client_" + Constants.ADMIN_CONSOLE_CLIENT_ID + "}"); String baseUrl = contextPath + "/admin/" + realm.getName() + "/console"; adminConsole.setBaseUrl(baseUrl + "/index.html"); adminConsole.setEnabled(true); @@ -184,6 +185,7 @@ public class RealmManager { ClientModel realmAdminClient = realm.getClientByClientId(realmAdminClientId); if (realmAdminClient == null) { realmAdminClient = clientManager.createClient(realm, realmAdminClientId); + realmAdminClient.setName("${client_" + realmAdminClientId + "}"); } RoleModel adminRole = realmAdminClient.addRole(AdminRoles.REALM_ADMIN); adminRole.setDescription("${role_" + AdminRoles.REALM_ADMIN + "}"); @@ -202,6 +204,7 @@ public class RealmManager { ClientModel client = realm.getClientNameMap().get(Constants.ACCOUNT_MANAGEMENT_CLIENT_ID); if (client == null) { client = new ClientManager(this).createClient(realm, Constants.ACCOUNT_MANAGEMENT_CLIENT_ID); + client.setName("${client_" + Constants.ACCOUNT_MANAGEMENT_CLIENT_ID + "}"); client.setEnabled(true); client.setFullScopeAllowed(false); String base = contextPath + "/realms/" + realm.getName() + "/account"; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/admin/AdminAPITest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/admin/AdminAPITest.java index 03124461e3..afee212b59 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/admin/AdminAPITest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/admin/AdminAPITest.java @@ -167,6 +167,7 @@ public class AdminAPITest { protected void checkAppUpdate(ClientRepresentation appRep, ClientRepresentation storedApp) { if (appRep.getClientId() != null) Assert.assertEquals(appRep.getClientId(), storedApp.getClientId()); + if (appRep.getName() != null) Assert.assertEquals(appRep.getName(), storedApp.getName()); if (appRep.isEnabled() != null) Assert.assertEquals(appRep.isEnabled(), storedApp.isEnabled()); if (appRep.isBearerOnly() != null) Assert.assertEquals(appRep.isBearerOnly(), storedApp.isBearerOnly()); if (appRep.isPublicClient() != null) Assert.assertEquals(appRep.isPublicClient(), storedApp.isPublicClient()); diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/model/ClientModelTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/model/ClientModelTest.java index e56d462506..efbefa6196 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/model/ClientModelTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/model/ClientModelTest.java @@ -31,6 +31,7 @@ public class ClientModelTest extends AbstractModelTest { realm = realmManager.createRealm("original"); client = realm.addClient("application"); + client.setName("Application"); client.setBaseUrl("http://base"); client.setManagementUrl("http://management"); client.setClientId("app-name"); @@ -85,6 +86,7 @@ public class ClientModelTest extends AbstractModelTest { public static void assertEquals(ClientModel expected, ClientModel actual) { Assert.assertEquals(expected.getClientId(), actual.getClientId()); + Assert.assertEquals(expected.getName(), actual.getName()); Assert.assertEquals(expected.getBaseUrl(), actual.getBaseUrl()); Assert.assertEquals(expected.getManagementUrl(), actual.getManagementUrl()); Assert.assertEquals(expected.getDefaultRoles(), actual.getDefaultRoles()); diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/model/ImportTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/model/ImportTest.java index bea52c4e09..317c101496 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/model/ImportTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/model/ImportTest.java @@ -99,6 +99,7 @@ public class ImportTest extends AbstractModelTest { Assert.assertTrue(clients.values().contains(accountApp)); realm.getClients().containsAll(clients.values()); + Assert.assertEquals("Applicationn", application.getName()); Assert.assertEquals(50, application.getNodeReRegistrationTimeout()); Map appRegisteredNodes = application.getRegisteredNodes(); Assert.assertEquals(2, appRegisteredNodes.size()); diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/oauth/OAuthGrantTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/oauth/OAuthGrantTest.java index 6985e88dab..65f6198af9 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/oauth/OAuthGrantTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/oauth/OAuthGrantTest.java @@ -72,6 +72,16 @@ public class OAuthGrantTest { private static String ROLE_USER = "Have User privileges"; private static String ROLE_CUSTOMER = "Have Customer User privileges"; + @Test + public void sleepTest() throws IOException { + try { + Thread.sleep(10000000); + } catch (InterruptedException ie) { + throw new RuntimeException(ie); + } + } + + @Test public void oauthGrantAcceptTest() throws IOException { oauth.clientId("third-party"); diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/pages/AccountAccessPage.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/pages/AccountApplicationsPage.java similarity index 93% rename from testsuite/integration/src/test/java/org/keycloak/testsuite/pages/AccountAccessPage.java rename to testsuite/integration/src/test/java/org/keycloak/testsuite/pages/AccountApplicationsPage.java index 99b591abc0..0825522275 100644 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/pages/AccountAccessPage.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/pages/AccountApplicationsPage.java @@ -15,9 +15,9 @@ import org.openqa.selenium.WebElement; /** * @author Marek Posolda */ -public class AccountAccessPage extends AbstractAccountPage { +public class AccountApplicationsPage extends AbstractAccountPage { - private String path = Urls.accountAccessPage(UriBuilder.fromUri(Constants.AUTH_SERVER_ROOT).build(), "test").toString(); + private String path = Urls.accountApplicationsPage(UriBuilder.fromUri(Constants.AUTH_SERVER_ROOT).build(), "test").toString(); @Override public boolean isCurrent() { diff --git a/testsuite/integration/src/test/resources/model/testrealm.json b/testsuite/integration/src/test/resources/model/testrealm.json index 1c0b7e64a2..e6d4d1887e 100755 --- a/testsuite/integration/src/test/resources/model/testrealm.json +++ b/testsuite/integration/src/test/resources/model/testrealm.json @@ -107,9 +107,10 @@ ] } ], - "applications": [ + "clients": [ { - "name": "Application", + "clientId": "Application", + "name": "Applicationn", "enabled": true, "nodeReRegistrationTimeout": 50, "registeredNodes": { @@ -118,7 +119,8 @@ } }, { - "name": "OtherApp", + "clientId": "OtherApp", + "name": "Other Application", "enabled": true, "protocolMappers" : [ {