diff --git a/broker/oidc/src/main/java/org/keycloak/broker/oidc/KeycloakOIDCIdentityProvider.java b/broker/oidc/src/main/java/org/keycloak/broker/oidc/KeycloakOIDCIdentityProvider.java
index 47847dc68dd..ff89a89edce 100755
--- a/broker/oidc/src/main/java/org/keycloak/broker/oidc/KeycloakOIDCIdentityProvider.java
+++ b/broker/oidc/src/main/java/org/keycloak/broker/oidc/KeycloakOIDCIdentityProvider.java
@@ -4,14 +4,12 @@ import org.keycloak.broker.oidc.util.SimpleHttp;
import org.keycloak.constants.AdapterConstants;
import org.keycloak.events.EventBuilder;
import org.keycloak.jose.jws.JWSInput;
-import org.keycloak.jose.jws.crypto.RSAProvider;
import org.keycloak.models.RealmModel;
import org.keycloak.models.UserSessionModel;
import org.keycloak.representations.adapters.action.AdminAction;
import org.keycloak.representations.adapters.action.LogoutAction;
import org.keycloak.services.managers.AuthenticationManager;
import org.keycloak.util.JsonSerialization;
-import org.keycloak.util.PemUtils;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
@@ -90,7 +88,7 @@ public class KeycloakOIDCIdentityProvider extends OIDCIdentityProvider {
@Override
public SimpleHttp generateTokenRequest(String authorizationCode) {
return super.generateTokenRequest(authorizationCode)
- .param(AdapterConstants.APPLICATION_SESSION_STATE, "n/a"); // hack to get backchannel logout to work
+ .param(AdapterConstants.CLIENT_SESSION_STATE, "n/a"); // hack to get backchannel logout to work
}
diff --git a/core/src/main/java/org/keycloak/constants/AdapterConstants.java b/core/src/main/java/org/keycloak/constants/AdapterConstants.java
index df302b2f1e7..aa223955d35 100755
--- a/core/src/main/java/org/keycloak/constants/AdapterConstants.java
+++ b/core/src/main/java/org/keycloak/constants/AdapterConstants.java
@@ -19,13 +19,13 @@ public interface AdapterConstants {
String AUTH_DATA_PARAM_NAME = "org.keycloak.json.adapterConfig";
// Attribute passed in codeToToken request from adapter to Keycloak and saved in ClientSession. Contains ID of HttpSession on adapter
- public static final String APPLICATION_SESSION_STATE = "application_session_state";
+ public static final String CLIENT_SESSION_STATE = "client_session_state";
// Attribute passed in codeToToken request from adapter to Keycloak and saved in ClientSession. Contains hostname of adapter where HttpSession is served
- public static final String APPLICATION_SESSION_HOST = "application_session_host";
+ public static final String CLIENT_SESSION_HOST = "client_session_host";
// Attribute passed in registerNode request for register new application cluster node once he joined cluster
- public static final String APPLICATION_CLUSTER_HOST = "application_cluster_host";
+ public static final String CLIENT_CLUSTER_HOST = "client_cluster_host";
// Cookie used on adapter side to store token info. Used only when tokenStore is 'COOKIE'
public static final String KEYCLOAK_ADAPTER_STATE_COOKIE = "KEYCLOAK_ADAPTER_STATE";
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 b109dc35583..21285c95727 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
@@ -54,7 +54,7 @@ public class ImportUtils {
if (Config.getAdminRealm().equals(realm.getId())) {
// Delete all masterAdmin apps due to foreign key constraints
for (RealmModel currRealm : model.getRealms()) {
- currRealm.setMasterAdminApp(null);
+ currRealm.setMasterAdminClient(null);
}
}
// TODO: For migration between versions, it should be possible to delete just realm but keep it's users
@@ -83,7 +83,7 @@ public class ImportUtils {
for (RealmModel currentRealm : model.getRealms()) {
ClientModel masterApp = adminRealm.getClientByClientId(KeycloakModelUtils.getMasterRealmAdminApplicationName(currentRealm));
if (masterApp != null) {
- currentRealm.setMasterAdminApp(masterApp);
+ currentRealm.setMasterAdminClient(masterApp);
} else {
setupMasterAdminManagement(model, currentRealm);
}
@@ -93,7 +93,7 @@ public class ImportUtils {
RealmModel adminRealm = model.getRealm(adminRealmId);
ClientModel masterApp = adminRealm.getClientByClientId(KeycloakModelUtils.getMasterRealmAdminApplicationName(realm));
if (masterApp != null) {
- realm.setMasterAdminApp(masterApp);
+ realm.setMasterAdminClient(masterApp);
} else {
setupMasterAdminManagement(model, realm);
}
@@ -121,7 +121,7 @@ public class ImportUtils {
ClientModel realmAdminApp = KeycloakModelUtils.createClient(adminRealm, KeycloakModelUtils.getMasterRealmAdminApplicationName(realm));
realmAdminApp.setBearerOnly(true);
- realm.setMasterAdminApp(realmAdminApp);
+ realm.setMasterAdminClient(realmAdminApp);
for (String r : AdminRoles.ALL_REALM_ROLES) {
RoleModel role = realmAdminApp.addRole(r);
diff --git a/forms/common-themes/src/main/resources/theme/base/admin/index.ftl b/forms/common-themes/src/main/resources/theme/base/admin/index.ftl
index 161acdad734..20e21b744f7 100755
--- a/forms/common-themes/src/main/resources/theme/base/admin/index.ftl
+++ b/forms/common-themes/src/main/resources/theme/base/admin/index.ftl
@@ -30,8 +30,7 @@
-
-
+
diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/js/app.js b/forms/common-themes/src/main/resources/theme/base/admin/resources/js/app.js
index f7ea60dddf0..f45453c7441 100755
--- a/forms/common-themes/src/main/resources/theme/base/admin/resources/js/app.js
+++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/js/app.js
@@ -212,8 +212,8 @@ module.config([ '$routeProvider', function($routeProvider) {
realm : function(RealmLoader) {
return RealmLoader();
},
- applications : function(ApplicationListLoader) {
- return ApplicationListLoader();
+ clients : function(ClientListLoader) {
+ return ClientListLoader();
},
roles : function(RoleListLoader) {
return RoleListLoader();
@@ -311,8 +311,8 @@ module.config([ '$routeProvider', function($routeProvider) {
user : function(UserLoader) {
return UserLoader();
},
- applications : function(ApplicationListLoader) {
- return ApplicationListLoader();
+ clients : function(ClientListLoader) {
+ return ClientListLoader();
}
},
controller : 'UserRoleMappingCtrl'
@@ -369,8 +369,8 @@ module.config([ '$routeProvider', function($routeProvider) {
roles : function(RoleListLoader) {
return RoleListLoader();
},
- applications : function(ApplicationListLoader) {
- return ApplicationListLoader();
+ clients : function(ClientListLoader) {
+ return ClientListLoader();
}
},
controller : 'RoleDetailCtrl'
@@ -387,8 +387,8 @@ module.config([ '$routeProvider', function($routeProvider) {
roles : function(RoleListLoader) {
return RoleListLoader();
},
- applications : function(ApplicationListLoader) {
- return ApplicationListLoader();
+ clients : function(ClientListLoader) {
+ return ClientListLoader();
}
},
controller : 'RoleDetailCtrl'
@@ -406,14 +406,14 @@ module.config([ '$routeProvider', function($routeProvider) {
controller : 'RoleListCtrl'
})
- .when('/create/role/:realm/applications/:application', {
- templateUrl : resourceUrl + '/partials/application-role-detail.html',
+ .when('/create/role/:realm/clients/:client', {
+ templateUrl : resourceUrl + '/partials/client-role-detail.html',
resolve : {
realm : function(RealmLoader) {
return RealmLoader();
},
- application : function(ApplicationLoader) {
- return ApplicationLoader();
+ client : function(ClientLoader) {
+ return ClientLoader();
},
role : function() {
return {};
@@ -421,56 +421,56 @@ module.config([ '$routeProvider', function($routeProvider) {
roles : function(RoleListLoader) {
return RoleListLoader();
},
- applications : function(ApplicationListLoader) {
- return ApplicationListLoader();
+ clients : function(ClientListLoader) {
+ return ClientListLoader();
}
},
- controller : 'ApplicationRoleDetailCtrl'
+ controller : 'ClientRoleDetailCtrl'
})
- .when('/realms/:realm/applications/:application/roles/:role', {
- templateUrl : resourceUrl + '/partials/application-role-detail.html',
+ .when('/realms/:realm/clients/:client/roles/:role', {
+ templateUrl : resourceUrl + '/partials/client-role-detail.html',
resolve : {
realm : function(RealmLoader) {
return RealmLoader();
},
- application : function(ApplicationLoader) {
- return ApplicationLoader();
+ client : function(ClientLoader) {
+ return ClientLoader();
},
- role : function(ApplicationRoleLoader) {
- return ApplicationRoleLoader();
+ role : function(ClientRoleLoader) {
+ return ClientRoleLoader();
},
roles : function(RoleListLoader) {
return RoleListLoader();
},
- applications : function(ApplicationListLoader) {
- return ApplicationListLoader();
+ clients : function(ClientListLoader) {
+ return ClientListLoader();
}
},
- controller : 'ApplicationRoleDetailCtrl'
+ controller : 'ClientRoleDetailCtrl'
})
- .when('/realms/:realm/applications/:application/mappers', {
- templateUrl : resourceUrl + '/partials/application-mappers.html',
+ .when('/realms/:realm/clients/:client/mappers', {
+ templateUrl : resourceUrl + '/partials/client-mappers.html',
resolve : {
realm : function(RealmLoader) {
return RealmLoader();
},
- application : function(ApplicationLoader) {
- return ApplicationLoader();
+ client : function(ClientLoader) {
+ return ClientLoader();
},
serverInfo : function(ServerInfoLoader) {
return ServerInfoLoader();
}
},
- controller : 'ApplicationProtocolMapperListCtrl'
+ controller : 'ClientProtocolMapperListCtrl'
})
- .when('/realms/:realm/applications/:application/add-mappers', {
- templateUrl : resourceUrl + '/partials/application-mappers-add.html',
+ .when('/realms/:realm/clients/:client/add-mappers', {
+ templateUrl : resourceUrl + '/partials/client-mappers-add.html',
resolve : {
realm : function(RealmLoader) {
return RealmLoader();
},
- application : function(ApplicationLoader) {
- return ApplicationLoader();
+ client : function(ClientLoader) {
+ return ClientLoader();
},
serverInfo : function(ServerInfoLoader) {
return ServerInfoLoader();
@@ -478,26 +478,26 @@ module.config([ '$routeProvider', function($routeProvider) {
},
controller : 'AddBuiltinProtocolMapperCtrl'
})
- .when('/realms/:realm/applications/:application/mappers/:id', {
+ .when('/realms/:realm/clients/:client/mappers/:id', {
templateUrl : resourceUrl + '/partials/protocol-mapper-detail.html',
resolve : {
realm : function(RealmLoader) {
return RealmLoader();
},
- application : function(ApplicationLoader) {
- return ApplicationLoader();
+ client : function(ClientLoader) {
+ return ClientLoader();
},
serverInfo : function(ServerInfoLoader) {
return ServerInfoLoader();
},
- mapper : function(ApplicationProtocolMapperLoader) {
- return ApplicationProtocolMapperLoader();
+ mapper : function(ClientProtocolMapperLoader) {
+ return ClientProtocolMapperLoader();
}
},
- controller : 'ApplicationProtocolMapperCtrl'
+ controller : 'ClientProtocolMapperCtrl'
})
- .when('/create/application/:realm/:application/mappers', {
+ .when('/create/client/:realm/:client/mappers', {
templateUrl : resourceUrl + '/partials/protocol-mapper-detail.html',
resolve : {
realm : function(RealmLoader) {
@@ -506,231 +506,231 @@ module.config([ '$routeProvider', function($routeProvider) {
serverInfo : function(ServerInfoLoader) {
return ServerInfoLoader();
},
- application : function(ApplicationLoader) {
- return ApplicationLoader();
+ client : function(ClientLoader) {
+ return ClientLoader();
}
},
- controller : 'ApplicationProtocolMapperCreateCtrl'
+ controller : 'ClientProtocolMapperCreateCtrl'
})
- .when('/realms/:realm/applications/:application/sessions', {
- templateUrl : resourceUrl + '/partials/application-sessions.html',
+ .when('/realms/:realm/clients/:client/sessions', {
+ templateUrl : resourceUrl + '/partials/client-sessions.html',
resolve : {
realm : function(RealmLoader) {
return RealmLoader();
},
- application : function(ApplicationLoader) {
- return ApplicationLoader();
+ client : function(ClientLoader) {
+ return ClientLoader();
},
- sessionCount : function(ApplicationSessionCountLoader) {
- return ApplicationSessionCountLoader();
+ sessionCount : function(ClientSessionCountLoader) {
+ return ClientSessionCountLoader();
}
},
- controller : 'ApplicationSessionsCtrl'
+ controller : 'ClientSessionsCtrl'
})
- .when('/realms/:realm/applications/:application/credentials', {
- templateUrl : resourceUrl + '/partials/application-credentials.html',
+ .when('/realms/:realm/clients/:client/credentials', {
+ templateUrl : resourceUrl + '/partials/client-credentials.html',
resolve : {
realm : function(RealmLoader) {
return RealmLoader();
},
- application : function(ApplicationLoader) {
- return ApplicationLoader();
+ client : function(ClientLoader) {
+ return ClientLoader();
}
},
- controller : 'ApplicationCredentialsCtrl'
+ controller : 'ClientCredentialsCtrl'
})
- .when('/realms/:realm/applications/:application/identity-provider', {
- templateUrl : resourceUrl + '/partials/application-identity-provider.html',
+ .when('/realms/:realm/clients/:client/identity-provider', {
+ templateUrl : resourceUrl + '/partials/client-identity-provider.html',
resolve : {
realm : function(RealmLoader) {
return RealmLoader();
},
- application : function(ApplicationLoader) {
- return ApplicationLoader();
+ client : function(ClientLoader) {
+ return ClientLoader();
}
},
- controller : 'ApplicationIdentityProviderCtrl'
+ controller : 'ClientIdentityProviderCtrl'
})
- .when('/realms/:realm/applications/:application/clustering', {
- templateUrl : resourceUrl + '/partials/application-clustering.html',
+ .when('/realms/:realm/clients/:client/clustering', {
+ templateUrl : resourceUrl + '/partials/client-clustering.html',
resolve : {
realm : function(RealmLoader) {
return RealmLoader();
},
- application : function(ApplicationLoader) {
- return ApplicationLoader();
+ client : function(ClientLoader) {
+ return ClientLoader();
}
},
- controller : 'ApplicationClusteringCtrl'
+ controller : 'ClientClusteringCtrl'
})
- .when('/register-node/realms/:realm/applications/:application/clustering', {
- templateUrl : resourceUrl + '/partials/application-clustering-node.html',
+ .when('/register-node/realms/:realm/clients/:client/clustering', {
+ templateUrl : resourceUrl + '/partials/client-clustering-node.html',
resolve : {
realm : function(RealmLoader) {
return RealmLoader();
},
- application : function(ApplicationLoader) {
- return ApplicationLoader();
+ client : function(ClientLoader) {
+ return ClientLoader();
}
},
- controller : 'ApplicationClusteringNodeCtrl'
+ controller : 'ClientClusteringNodeCtrl'
})
- .when('/realms/:realm/applications/:application/clustering/:node', {
- templateUrl : resourceUrl + '/partials/application-clustering-node.html',
+ .when('/realms/:realm/clients/:client/clustering/:node', {
+ templateUrl : resourceUrl + '/partials/client-clustering-node.html',
resolve : {
realm : function(RealmLoader) {
return RealmLoader();
},
- application : function(ApplicationLoader) {
- return ApplicationLoader();
+ client : function(ClientLoader) {
+ return ClientLoader();
}
},
- controller : 'ApplicationClusteringNodeCtrl'
+ controller : 'ClientClusteringNodeCtrl'
})
- .when('/realms/:realm/applications/:application/saml/keys', {
- templateUrl : resourceUrl + '/partials/application-saml-keys.html',
+ .when('/realms/:realm/clients/:client/saml/keys', {
+ templateUrl : resourceUrl + '/partials/client-saml-keys.html',
resolve : {
realm : function(RealmLoader) {
return RealmLoader();
},
- application : function(ApplicationLoader) {
- return ApplicationLoader();
+ client : function(ClientLoader) {
+ return ClientLoader();
}
},
- controller : 'ApplicationSamlKeyCtrl'
+ controller : 'ClientSamlKeyCtrl'
})
- .when('/realms/:realm/applications/:application/saml/:keyType/import/:attribute', {
- templateUrl : resourceUrl + '/partials/application-saml-key-import.html',
+ .when('/realms/:realm/clients/:client/saml/:keyType/import/:attribute', {
+ templateUrl : resourceUrl + '/partials/client-saml-key-import.html',
resolve : {
realm : function(RealmLoader) {
return RealmLoader();
},
- application : function(ApplicationLoader) {
- return ApplicationLoader();
+ client : function(ClientLoader) {
+ return ClientLoader();
}
},
- controller : 'ApplicationCertificateImportCtrl'
+ controller : 'ClientCertificateImportCtrl'
})
- .when('/realms/:realm/applications/:application/saml/:keyType/export/:attribute', {
- templateUrl : resourceUrl + '/partials/application-saml-key-export.html',
+ .when('/realms/:realm/clients/:client/saml/:keyType/export/:attribute', {
+ templateUrl : resourceUrl + '/partials/client-saml-key-export.html',
resolve : {
realm : function(RealmLoader) {
return RealmLoader();
},
- application : function(ApplicationLoader) {
- return ApplicationLoader();
+ client : function(ClientLoader) {
+ return ClientLoader();
}
},
- controller : 'ApplicationCertificateExportCtrl'
+ controller : 'ClientCertificateExportCtrl'
})
- .when('/realms/:realm/applications/:application/roles', {
- templateUrl : resourceUrl + '/partials/application-role-list.html',
+ .when('/realms/:realm/clients/:client/roles', {
+ templateUrl : resourceUrl + '/partials/client-role-list.html',
resolve : {
realm : function(RealmLoader) {
return RealmLoader();
},
- application : function(ApplicationLoader) {
- return ApplicationLoader();
+ client : function(ClientLoader) {
+ return ClientLoader();
},
- roles : function(ApplicationRoleListLoader) {
- return ApplicationRoleListLoader();
+ roles : function(ClientRoleListLoader) {
+ return ClientRoleListLoader();
}
},
- controller : 'ApplicationRoleListCtrl'
+ controller : 'ClientRoleListCtrl'
})
- .when('/realms/:realm/applications/:application/revocation', {
- templateUrl : resourceUrl + '/partials/application-revocation.html',
+ .when('/realms/:realm/clients/:client/revocation', {
+ templateUrl : resourceUrl + '/partials/client-revocation.html',
resolve : {
realm : function(RealmLoader) {
return RealmLoader();
},
- application : function(ApplicationLoader) {
- return ApplicationLoader();
+ client : function(ClientLoader) {
+ return ClientLoader();
}
},
- controller : 'ApplicationRevocationCtrl'
+ controller : 'ClientRevocationCtrl'
})
- .when('/realms/:realm/applications/:application/scope-mappings', {
- templateUrl : resourceUrl + '/partials/application-scope-mappings.html',
+ .when('/realms/:realm/clients/:client/scope-mappings', {
+ templateUrl : resourceUrl + '/partials/client-scope-mappings.html',
resolve : {
realm : function(RealmLoader) {
return RealmLoader();
},
- application : function(ApplicationLoader) {
- return ApplicationLoader();
+ client : function(ClientLoader) {
+ return ClientLoader();
},
- applications : function(ApplicationListLoader) {
- return ApplicationListLoader();
+ clients : function(ClientListLoader) {
+ return ClientListLoader();
}
},
- controller : 'ApplicationScopeMappingCtrl'
+ controller : 'ClientScopeMappingCtrl'
})
- .when('/realms/:realm/applications/:application/installation', {
- templateUrl : resourceUrl + '/partials/application-installation.html',
+ .when('/realms/:realm/clients/:client/installation', {
+ templateUrl : resourceUrl + '/partials/client-installation.html',
resolve : {
realm : function(RealmLoader) {
return RealmLoader();
},
- application : function(ApplicationLoader) {
- return ApplicationLoader();
+ client : function(ClientLoader) {
+ return ClientLoader();
}
},
- controller : 'ApplicationInstallationCtrl'
+ controller : 'ClientInstallationCtrl'
})
- .when('/create/application/:realm', {
- templateUrl : resourceUrl + '/partials/application-detail.html',
+ .when('/create/client/:realm', {
+ templateUrl : resourceUrl + '/partials/client-detail.html',
resolve : {
realm : function(RealmLoader) {
return RealmLoader();
},
- applications : function(ApplicationListLoader) {
- return ApplicationListLoader();
+ clients : function(ClientListLoader) {
+ return ClientListLoader();
},
- application : function() {
+ client : function() {
return {};
},
serverInfo : function(ServerInfoLoader) {
return ServerInfoLoader();
}
},
- controller : 'ApplicationDetailCtrl'
+ controller : 'ClientDetailCtrl'
})
- .when('/realms/:realm/applications/:application', {
- templateUrl : resourceUrl + '/partials/application-detail.html',
+ .when('/realms/:realm/clients/:client', {
+ templateUrl : resourceUrl + '/partials/client-detail.html',
resolve : {
realm : function(RealmLoader) {
return RealmLoader();
},
- applications : function(ApplicationListLoader) {
- return ApplicationListLoader();
+ clients : function(ClientListLoader) {
+ return ClientListLoader();
},
- application : function(ApplicationLoader) {
- return ApplicationLoader();
+ client : function(ClientLoader) {
+ return ClientLoader();
},
serverInfo : function(ServerInfoLoader) {
return ServerInfoLoader();
}
},
- controller : 'ApplicationDetailCtrl'
+ controller : 'ClientDetailCtrl'
})
- .when('/realms/:realm/applications', {
- templateUrl : resourceUrl + '/partials/application-list.html',
+ .when('/realms/:realm/clients', {
+ templateUrl : resourceUrl + '/partials/client-list.html',
resolve : {
realm : function(RealmLoader) {
return RealmLoader();
},
- applications : function(ApplicationListLoader) {
- return ApplicationListLoader();
+ clients : function(ClientListLoader) {
+ return ClientListLoader();
},
serverInfo : function(ServerInfoLoader) {
return ServerInfoLoader();
}
},
- controller : 'ApplicationListCtrl'
+ controller : 'ClientListCtrl'
})
- .when('/import/application/:realm', {
- templateUrl : resourceUrl + '/partials/application-import.html',
+ .when('/import/client/:realm', {
+ templateUrl : resourceUrl + '/partials/client-import.html',
resolve : {
realm : function(RealmLoader) {
return RealmLoader();
@@ -739,7 +739,7 @@ module.config([ '$routeProvider', function($routeProvider) {
return ServerInfoLoader();
}
},
- controller : 'ApplicationImportCtrl'
+ controller : 'ClientImportCtrl'
})
.when('/', {
templateUrl : resourceUrl + '/partials/home.html',
@@ -772,8 +772,8 @@ module.config([ '$routeProvider', function($routeProvider) {
realm : function(RealmLoader) {
return RealmLoader();
},
- stats : function(RealmApplicationSessionStatsLoader) {
- return RealmApplicationSessionStatsLoader();
+ stats : function(RealmClientSessionStatsLoader) {
+ return RealmClientSessionStatsLoader();
}
},
controller : 'RealmSessionStatsCtrl'
@@ -1353,12 +1353,12 @@ module.directive('kcNavigation', function ($compile, Notifications) {
}
});
-module.directive('kcNavigationApplication', function () {
+module.directive('kcNavigationClient', function () {
return {
scope: true,
restrict: 'E',
replace: true,
- templateUrl: resourceUrl + '/templates/kc-navigation-application.html'
+ templateUrl: resourceUrl + '/templates/kc-navigation-client.html'
}
});
diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/applications.js b/forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/clients.js
similarity index 51%
rename from forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/applications.js
rename to forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/clients.js
index 307f805deaf..2324d4876b3 100755
--- a/forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/applications.js
+++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/clients.js
@@ -4,14 +4,10 @@ Array.prototype.remove = function(from, to) {
return this.push.apply(this, rest);
};
-module.controller('ApplicationRoleListCtrl', function($scope, $location, realm, application, roles) {
+module.controller('ClientRoleListCtrl', function($scope, $location, realm, client, roles) {
$scope.realm = realm;
$scope.roles = roles;
- $scope.application = application;
-
- for (var i = 0; i < roles.length; i++) {
- console.log("role.id: " + roles[i].id + " role.name: " + roles[i].name);
- }
+ $scope.client = client;
$scope.$watch(function() {
return $location.path();
@@ -20,17 +16,17 @@ module.controller('ApplicationRoleListCtrl', function($scope, $location, realm,
});
});
-module.controller('ApplicationCredentialsCtrl', function($scope, $location, realm, application, ApplicationCredentials, Notifications) {
+module.controller('ClientCredentialsCtrl', function($scope, $location, realm, client, ClientCredentials, Notifications) {
$scope.realm = realm;
- $scope.application = application;
- var secret = ApplicationCredentials.get({ realm : realm.realm, application : application.id },
+ $scope.client = client;
+ var secret = ClientCredentials.get({ realm : realm.realm, client : client.id },
function() {
$scope.secret = secret.value;
}
);
$scope.changePassword = function() {
- var secret = ApplicationCredentials.update({ realm : realm.realm, application : application.id },
+ var secret = ClientCredentials.update({ realm : realm.realm, client : client.id },
function() {
Notifications.success('The secret has been changed.');
$scope.secret = secret.value;
@@ -49,107 +45,107 @@ module.controller('ApplicationCredentialsCtrl', function($scope, $location, real
});
});
-module.controller('ApplicationIdentityProviderCtrl', function($scope, $location, $route, realm, application, Application, $location, Notifications) {
+module.controller('ClientIdentityProviderCtrl', function($scope, $location, $route, realm, client, Client, $location, Notifications) {
$scope.realm = realm;
- $scope.application = angular.copy(application);
+ $scope.client = angular.copy(client);
var length = 0;
- if ($scope.application.identityProviders) {
- length = $scope.application.identityProviders.length;
+ if ($scope.client.identityProviders) {
+ length = $scope.client.identityProviders.length;
- for (i = 0; i < $scope.application.identityProviders.length; i++) {
- var applicationProvider = $scope.application.identityProviders[i];
- if (applicationProvider.retrieveToken) {
- applicationProvider.retrieveToken = applicationProvider.retrieveToken.toString();
+ for (i = 0; i < $scope.client.identityProviders.length; i++) {
+ var clientProvider = $scope.client.identityProviders[i];
+ if (clientProvider.retrieveToken) {
+ clientProvider.retrieveToken = clientProvider.retrieveToken.toString();
}
}
} else {
- $scope.application.identityProviders = [];
+ $scope.client.identityProviders = [];
}
$scope.identityProviders = [];
- var providersMissingInApp = [];
+ var providersMissingInClient = [];
for (j = 0; j < realm.identityProviders.length; j++) {
var identityProvider = realm.identityProviders[j];
- var applicationProvider = null;
+ var clientProvider = null;
- for (i = 0; i < $scope.application.identityProviders.length; i++) {
- applicationProvider = $scope.application.identityProviders[i];
+ for (i = 0; i < $scope.client.identityProviders.length; i++) {
+ clientProvider = $scope.client.identityProviders[i];
- if (applicationProvider) {
+ if (clientProvider) {
- if (applicationProvider.id == identityProvider.id) {
+ if (clientProvider.id == identityProvider.id) {
$scope.identityProviders[i] = {};
$scope.identityProviders[i].identityProvider = identityProvider;
- $scope.identityProviders[i].retrieveToken = applicationProvider.retrieveToken;
+ $scope.identityProviders[i].retrieveToken = clientProvider.retrieveToken;
break;
}
- applicationProvider = null;
+ clientProvider = null;
}
}
- if (applicationProvider == null) {
- providersMissingInApp.push(identityProvider);
+ if (clientProvider == null) {
+ providersMissingInClient.push(identityProvider);
}
}
- for (j = 0; j < providersMissingInApp.length; j++) {
- var identityProvider = providersMissingInApp[j];
+ for (j = 0; j < providersMissingInClient.length; j++) {
+ var identityProvider = providersMissingInClient[j];
var currentProvider = {};
currentProvider.identityProvider = identityProvider;
currentProvider.retrieveToken = "false";
$scope.identityProviders.push(currentProvider);
- var currentAppProvider = {};
- currentAppProvider.id = identityProvider.id;
- currentAppProvider.retrieveToken = "false";
- $scope.application.identityProviders.push(currentAppProvider);
+ var currentClientProvider = {};
+ currentClientProvider.id = identityProvider.id;
+ currentClientProvider.retrieveToken = "false";
+ $scope.client.identityProviders.push(currentClientProvider);
}
- var oldCopy = angular.copy($scope.application);
+ var oldCopy = angular.copy($scope.client);
$scope.save = function() {
- Application.update({
+ Client.update({
realm : realm.realm,
- application : application.id
- }, $scope.application, function() {
+ client : client.id
+ }, $scope.client, function() {
$scope.changed = false;
$route.reload();
- Notifications.success("Your changes have been saved to the application.");
+ Notifications.success("Your changes have been saved to the client.");
});
};
$scope.reset = function() {
- $scope.application = angular.copy(oldCopy);
+ $scope.client = angular.copy(oldCopy);
$scope.changed = false;
};
- $scope.$watch('application', function() {
- if (!angular.equals($scope.application, oldCopy)) {
+ $scope.$watch('client', function() {
+ if (!angular.equals($scope.client, oldCopy)) {
$scope.changed = true;
}
}, true);
});
-module.controller('ApplicationSamlKeyCtrl', function($scope, $location, $http, $upload, realm, application,
- ApplicationCertificate, ApplicationCertificateGenerate,
- ApplicationCertificateDownload, Notifications) {
+module.controller('ClientSamlKeyCtrl', function($scope, $location, $http, $upload, realm, client,
+ ClientCertificate, ClientCertificateGenerate,
+ ClientCertificateDownload, Notifications) {
$scope.realm = realm;
- $scope.application = application;
+ $scope.client = client;
- var signingKeyInfo = ApplicationCertificate.get({ realm : realm.realm, application : application.id, attribute: 'saml.signing' },
+ var signingKeyInfo = ClientCertificate.get({ realm : realm.realm, client : client.id, attribute: 'saml.signing' },
function() {
$scope.signingKeyInfo = signingKeyInfo;
}
);
$scope.generateSigningKey = function() {
- var keyInfo = ApplicationCertificateGenerate.generate({ realm : realm.realm, application : application.id, attribute: 'saml.signing' },
+ var keyInfo = ClientCertificateGenerate.generate({ realm : realm.realm, client : client.id, attribute: 'saml.signing' },
function() {
Notifications.success('Signing key has been regenerated.');
$scope.signingKeyInfo = keyInfo;
@@ -161,21 +157,21 @@ module.controller('ApplicationSamlKeyCtrl', function($scope, $location, $http, $
};
$scope.importSigningKey = function() {
- $location.url("/realms/" + realm.realm + "/applications/" + application.id + "/saml/Signing/import/saml.signing");
+ $location.url("/realms/" + realm.realm + "/clients/" + client.id + "/saml/Signing/import/saml.signing");
};
$scope.exportSigningKey = function() {
- $location.url("/realms/" + realm.realm + "/applications/" + application.id + "/saml/Signing/export/saml.signing");
+ $location.url("/realms/" + realm.realm + "/clients/" + client.id + "/saml/Signing/export/saml.signing");
};
- var encryptionKeyInfo = ApplicationCertificate.get({ realm : realm.realm, application : application.id, attribute: 'saml.encryption' },
+ var encryptionKeyInfo = ClientCertificate.get({ realm : realm.realm, client : client.id, attribute: 'saml.encryption' },
function() {
$scope.encryptionKeyInfo = encryptionKeyInfo;
}
);
$scope.generateEncryptionKey = function() {
- var keyInfo = ApplicationCertificateGenerate.generate({ realm : realm.realm, application : application.id, attribute: 'saml.encryption' },
+ var keyInfo = ClientCertificateGenerate.generate({ realm : realm.realm, client : client.id, attribute: 'saml.encryption' },
function() {
Notifications.success('Encryption key has been regenerated.');
$scope.encryptionKeyInfo = keyInfo;
@@ -187,11 +183,11 @@ module.controller('ApplicationSamlKeyCtrl', function($scope, $location, $http, $
};
$scope.importEncryptionKey = function() {
- $location.url("/realms/" + realm.realm + "/applications/" + application.id + "/saml/Encryption/import/saml.encryption");
+ $location.url("/realms/" + realm.realm + "/clients/" + client.id + "/saml/Encryption/import/saml.encryption");
};
$scope.exportEncryptionKey = function() {
- $location.url("/realms/" + realm.realm + "/applications/" + application.id + "/saml/Encryption/export/saml.encryption");
+ $location.url("/realms/" + realm.realm + "/clients/" + client.id + "/saml/Encryption/export/saml.encryption");
};
@@ -202,14 +198,14 @@ module.controller('ApplicationSamlKeyCtrl', function($scope, $location, $http, $
});
});
-module.controller('ApplicationCertificateImportCtrl', function($scope, $location, $http, $upload, realm, application, $routeParams,
- ApplicationCertificate, ApplicationCertificateGenerate,
- ApplicationCertificateDownload, Notifications) {
+module.controller('ClientCertificateImportCtrl', function($scope, $location, $http, $upload, realm, client, $routeParams,
+ ClientCertificate, ClientCertificateGenerate,
+ ClientCertificateDownload, Notifications) {
var keyType = $routeParams.keyType;
var attribute = $routeParams.attribute;
$scope.realm = realm;
- $scope.application = application;
+ $scope.client = client;
$scope.keyType = keyType;
$scope.files = [];
@@ -234,7 +230,7 @@ module.controller('ApplicationCertificateImportCtrl', function($scope, $location
for (var i = 0; i < $scope.files.length; i++) {
var $file = $scope.files[i];
$scope.upload = $upload.upload({
- url: authUrl + '/admin/realms/' + realm.realm + '/applications-by-id/' + application.id + '/certificates/' + attribute + '/upload',
+ url: authUrl + '/admin/realms/' + realm.realm + '/clients-by-id/' + client.id + '/certificates/' + attribute + '/upload',
// method: POST or PUT,
// headers: {'headerKey': 'headerValue'}, withCredential: true,
data: {keystoreFormat: $scope.uploadKeyFormat,
@@ -247,11 +243,9 @@ module.controller('ApplicationCertificateImportCtrl', function($scope, $location
//fileFormDataName: myFile,
/* customize how data is added to formData. See #40#issuecomment-28612000 for example */
//formDataAppender: function(formData, key, val){}
- }).progress(function(evt) {
- console.log('percent: ' + parseInt(100.0 * evt.loaded / evt.total));
}).success(function(data, status, headers) {
Notifications.success("Keystore uploaded successfully.");
- $location.url("/realms/" + realm.realm + "/applications/" + application.id + "/saml/keys");
+ $location.url("/realms/" + realm.realm + "/clients/" + client.id + "/saml/keys");
})
.error(function() {
Notifications.error("The key store can not be uploaded. Please verify the file.");
@@ -268,16 +262,16 @@ module.controller('ApplicationCertificateImportCtrl', function($scope, $location
});
});
-module.controller('ApplicationCertificateExportCtrl', function($scope, $location, $http, $upload, realm, application, $routeParams,
- ApplicationCertificate, ApplicationCertificateGenerate,
- ApplicationCertificateDownload, Notifications) {
+module.controller('ClientCertificateExportCtrl', function($scope, $location, $http, $upload, realm, client, $routeParams,
+ ClientCertificate, ClientCertificateGenerate,
+ ClientCertificateDownload, Notifications) {
var keyType = $routeParams.keyType;
var attribute = $routeParams.attribute;
$scope.realm = realm;
- $scope.application = application;
+ $scope.client = client;
$scope.keyType = keyType;
var jks = {
- keyAlias: application.name,
+ keyAlias: client.clientId,
realmAlias: realm.realm
};
@@ -286,7 +280,7 @@ module.controller('ApplicationCertificateExportCtrl', function($scope, $location
"PKCS12"
];
- var keyInfo = ApplicationCertificate.get({ realm : realm.realm, application : application.id, attribute: attribute },
+ var keyInfo = ClientCertificate.get({ realm : realm.realm, client : client.id, attribute: attribute },
function() {
$scope.keyInfo = keyInfo;
}
@@ -296,17 +290,17 @@ module.controller('ApplicationCertificateExportCtrl', function($scope, $location
$scope.download = function() {
$http({
- url: authUrl + '/admin/realms/' + realm.realm + '/applications-by-id/' + application.id + '/certificates/' + attribute + '/download',
+ url: authUrl + '/admin/realms/' + realm.realm + '/clients-by-id/' + client.id + '/certificates/' + attribute + '/download',
method: 'POST',
responseType: 'arraybuffer',
data: $scope.jks,
headers: {
'Content-Type': 'application/json',
- 'Accept': 'application/octet-stream'
+ 'Accept': 'client/octet-stream'
}
}).success(function(data){
var blob = new Blob([data], {
- type: 'application/octet-stream'
+ type: 'client/octet-stream'
});
var ext = ".jks";
if ($scope.jks.format == 'PKCS12') ext = ".p12";
@@ -323,18 +317,18 @@ module.controller('ApplicationCertificateExportCtrl', function($scope, $location
});
});
-module.controller('ApplicationSessionsCtrl', function($scope, realm, sessionCount, application,
- ApplicationUserSessions) {
+module.controller('ClientSessionsCtrl', function($scope, realm, sessionCount, client,
+ ClientUserSessions) {
$scope.realm = realm;
$scope.count = sessionCount.count;
$scope.sessions = [];
- $scope.application = application;
+ $scope.client = client;
$scope.page = 0;
$scope.query = {
realm : realm.realm,
- application: $scope.application.id,
+ client: $scope.client.id,
max : 5,
first : 0
}
@@ -365,17 +359,17 @@ module.controller('ApplicationSessionsCtrl', function($scope, realm, sessionCoun
};
$scope.loadUsers = function() {
- ApplicationUserSessions.query($scope.query, function(updated) {
+ ClientUserSessions.query($scope.query, function(updated) {
$scope.sessions = updated;
})
};
});
-module.controller('ApplicationRoleDetailCtrl', function($scope, realm, application, role, roles, applications,
- Role, ApplicationRole, RoleById, RoleRealmComposites, RoleApplicationComposites,
+module.controller('ClientRoleDetailCtrl', function($scope, realm, client, role, roles, clients,
+ Role, ClientRole, RoleById, RoleRealmComposites, RoleClientComposites,
$http, $location, Dialog, Notifications) {
$scope.realm = realm;
- $scope.application = application;
+ $scope.client = client;
$scope.role = angular.copy(role);
$scope.create = !role.name;
@@ -383,16 +377,16 @@ module.controller('ApplicationRoleDetailCtrl', function($scope, realm, applicati
$scope.save = function() {
if ($scope.create) {
- ApplicationRole.save({
+ ClientRole.save({
realm: realm.realm,
- application : application.id
+ client : client.id
}, $scope.role, function (data, headers) {
$scope.changed = false;
role = angular.copy($scope.role);
- ApplicationRole.get({ realm: realm.realm, application : application.id, role: role.name }, function(role) {
+ ClientRole.get({ realm: realm.realm, client : client.id, role: role.name }, function(role) {
var id = role.id;
- $location.url("/realms/" + realm.realm + "/applications/" + application.id + "/roles/" + id);
+ $location.url("/realms/" + realm.realm + "/clients/" + client.id + "/roles/" + id);
Notifications.success("The role has been created.");
});
});
@@ -405,30 +399,30 @@ module.controller('ApplicationRoleDetailCtrl', function($scope, realm, applicati
Dialog.confirmDelete($scope.role.name, 'role', function() {
$scope.role.$remove({
realm : realm.realm,
- application : application.id,
+ client : client.id,
role : $scope.role.id
}, function() {
- $location.url("/realms/" + realm.realm + "/applications/" + application.id + "/roles");
+ $location.url("/realms/" + realm.realm + "/clients/" + client.id + "/roles");
Notifications.success("The role has been deleted.");
});
});
};
$scope.cancel = function () {
- $location.url("/realms/" + realm.realm + "/applications/" + application.id + "/roles");
+ $location.url("/realms/" + realm.realm + "/clients/" + client.id + "/roles");
};
- roleControl($scope, realm, role, roles, applications,
- ApplicationRole, RoleById, RoleRealmComposites, RoleApplicationComposites,
+ roleControl($scope, realm, role, roles, clients,
+ ClientRole, RoleById, RoleRealmComposites, RoleClientComposites,
$http, $location, Notifications, Dialog);
});
-module.controller('ApplicationImportCtrl', function($scope, $location, $upload, realm, serverInfo, Notifications) {
+module.controller('ClientImportCtrl', function($scope, $location, $upload, realm, serverInfo, Notifications) {
$scope.realm = realm;
- $scope.configFormats = serverInfo.applicationImporters;
+ $scope.configFormats = serverInfo.clientImporters;
$scope.configFormat = null;
$scope.files = [];
@@ -446,7 +440,7 @@ module.controller('ApplicationImportCtrl', function($scope, $location, $upload,
for (var i = 0; i < $scope.files.length; i++) {
var $file = $scope.files[i];
$scope.upload = $upload.upload({
- url: authUrl + '/admin/realms/' + realm.realm + '/application-importers/' + $scope.configFormat.id + '/upload',
+ url: authUrl + '/admin/realms/' + realm.realm + '/client-importers/' + $scope.configFormat.id + '/upload',
// method: POST or PUT,
// headers: {'headerKey': 'headerValue'}, withCredential: true,
data: {myObj: ""},
@@ -455,11 +449,9 @@ module.controller('ApplicationImportCtrl', function($scope, $location, $upload,
//fileFormDataName: myFile,
/* customize how data is added to formData. See #40#issuecomment-28612000 for example */
//formDataAppender: function(formData, key, val){}
- }).progress(function(evt) {
- console.log('percent: ' + parseInt(100.0 * evt.loaded / evt.total));
}).success(function(data, status, headers) {
Notifications.success("Uploaded successfully.");
- $location.url("/realms/" + realm.realm + "/applications");
+ $location.url("/realms/" + realm.realm + "/clients");
})
.error(function() {
Notifications.error("The file can not be uploaded. Please verify the file.");
@@ -477,10 +469,10 @@ module.controller('ApplicationImportCtrl', function($scope, $location, $upload,
});
-module.controller('ApplicationListCtrl', function($scope, realm, applications, Application, serverInfo, $location) {
+module.controller('ClientListCtrl', function($scope, realm, clients, Client, serverInfo, $location) {
$scope.realm = realm;
- $scope.applications = applications;
- $scope.importButton = serverInfo.applicationImporters.length > 0;
+ $scope.clients = clients;
+ $scope.importButton = serverInfo.clientImporters.length > 0;
$scope.$watch(function() {
return $location.path();
}, function() {
@@ -488,10 +480,9 @@ module.controller('ApplicationListCtrl', function($scope, realm, applications, A
});
});
-module.controller('ApplicationInstallationCtrl', function($scope, realm, application, ApplicationInstallation,ApplicationInstallationJBoss, $http, $routeParams) {
- console.log('ApplicationInstallationCtrl');
+module.controller('ClientInstallationCtrl', function($scope, realm, client, ClientInstallation,ClientInstallationJBoss, $http, $routeParams) {
$scope.realm = realm;
- $scope.application = application;
+ $scope.client = client;
$scope.installation = null;
$scope.download = null;
$scope.configFormat = null;
@@ -503,14 +494,14 @@ module.controller('ApplicationInstallationCtrl', function($scope, realm, applica
$scope.changeFormat = function() {
if ($scope.configFormat == "keycloak.json") {
- var url = ApplicationInstallation.url({ realm: $routeParams.realm, application: $routeParams.application });
+ var url = ClientInstallation.url({ realm: $routeParams.realm, client: $routeParams.client });
$http.get(url).success(function(data) {
var tmp = angular.fromJson(data);
$scope.installation = angular.toJson(tmp, true);
$scope.type = 'application/json';
})
} else if ($scope.configFormat == "Wildfly/JBoss Subsystem XML") {
- var url = ApplicationInstallationJBoss.url({ realm: $routeParams.realm, application: $routeParams.application });
+ var url = ClientInstallationJBoss.url({ realm: $routeParams.realm, client: $routeParams.client });
$http.get(url).success(function(data) {
$scope.installation = data;
$scope.type = 'text/xml';
@@ -523,9 +514,7 @@ module.controller('ApplicationInstallationCtrl', function($scope, realm, applica
}
});
-module.controller('ApplicationDetailCtrl', function($scope, realm, application, serverInfo, Application, $location, Dialog, Notifications) {
- console.log('ApplicationDetailCtrl');
-
+module.controller('ClientDetailCtrl', function($scope, realm, client, serverInfo, Client, $location, Dialog, Notifications) {
$scope.accessTypes = [
"confidential",
"public",
@@ -548,7 +537,7 @@ module.controller('ApplicationDetailCtrl', function($scope, realm, application,
];
$scope.realm = realm;
- $scope.create = !application.name;
+ $scope.create = !client.clientId;
$scope.samlAuthnStatement = false;
$scope.samlMultiValuedRoles = false;
$scope.samlServerSignature = false;
@@ -558,43 +547,43 @@ module.controller('ApplicationDetailCtrl', function($scope, realm, application,
$scope.samlForcePostBinding = false;
$scope.samlForceNameIdFormat = false;
if (!$scope.create) {
- if (!application.attributes) {
- application.attributes = {};
+ if (!client.attributes) {
+ client.attributes = {};
}
- $scope.application= angular.copy(application);
+ $scope.client= angular.copy(client);
$scope.accessType = $scope.accessTypes[0];
- if (application.bearerOnly) {
+ if (client.bearerOnly) {
$scope.accessType = $scope.accessTypes[2];
- } else if (application.publicClient) {
+ } else if (client.publicClient) {
$scope.accessType = $scope.accessTypes[1];
}
- if (application.protocol) {
- $scope.protocol = $scope.protocols[$scope.protocols.indexOf(application.protocol)];
+ if (client.protocol) {
+ $scope.protocol = $scope.protocols[$scope.protocols.indexOf(client.protocol)];
} else {
$scope.protocol = $scope.protocols[0];
}
- if (application.attributes['saml.signature.algorithm'] == 'RSA_SHA1') {
+ if (client.attributes['saml.signature.algorithm'] == 'RSA_SHA1') {
$scope.signatureAlgorithm = $scope.signatureAlgorithms[0];
- } else if (application.attributes['saml.signature.algorithm'] == 'RSA_SHA256') {
+ } else if (client.attributes['saml.signature.algorithm'] == 'RSA_SHA256') {
$scope.signatureAlgorithm = $scope.signatureAlgorithms[1];
- } else if (application.attributes['saml.signature.algorithm'] == 'RSA_SHA512') {
+ } else if (client.attributes['saml.signature.algorithm'] == 'RSA_SHA512') {
$scope.signatureAlgorithm = $scope.signatureAlgorithms[2];
- } else if (application.attributes['saml.signature.algorithm'] == 'DSA_SHA1') {
+ } else if (client.attributes['saml.signature.algorithm'] == 'DSA_SHA1') {
$scope.signatureAlgorithm = $scope.signatureAlgorithms[3];
}
- if (application.attributes['saml_name_id_format'] == 'unspecified') {
+ if (client.attributes['saml_name_id_format'] == 'unspecified') {
$scope.nameIdFormat = $scope.nameIdFormats[0];
- } else if (application.attributes['saml_name_id_format'] == 'email') {
+ } else if (client.attributes['saml_name_id_format'] == 'email') {
$scope.nameIdFormat = $scope.nameIdFormats[1];
- } else if (application.attributes['saml_name_id_format'] == 'transient') {
+ } else if (client.attributes['saml_name_id_format'] == 'transient') {
$scope.nameIdFormat = $scope.nameIdFormats[2];
- } else if (application.attributes['saml_name_id_format'] == 'persistent') {
+ } else if (client.attributes['saml_name_id_format'] == 'persistent') {
$scope.nameIdFormat = $scope.nameIdFormats[3];
}
} else {
- $scope.application = { enabled: true, attributes: {}};
- $scope.application.redirectUris = [];
+ $scope.client = { enabled: true, attributes: {}};
+ $scope.client.redirectUris = [];
$scope.accessType = $scope.accessTypes[0];
$scope.protocol = $scope.protocols[0];
$scope.signatureAlgorithm = $scope.signatureAlgorithms[1];
@@ -603,58 +592,58 @@ module.controller('ApplicationDetailCtrl', function($scope, realm, application,
$scope.samlForceNameIdFormat = false;
}
- if ($scope.application.attributes["saml.server.signature"]) {
- if ($scope.application.attributes["saml.server.signature"] == "true") {
+ if ($scope.client.attributes["saml.server.signature"]) {
+ if ($scope.client.attributes["saml.server.signature"] == "true") {
$scope.samlServerSignature = true;
} else {
$scope.samlServerSignature = false;
}
}
- if ($scope.application.attributes["saml.assertion.signature"]) {
- if ($scope.application.attributes["saml.assertion.signature"] == "true") {
+ if ($scope.client.attributes["saml.assertion.signature"]) {
+ if ($scope.client.attributes["saml.assertion.signature"] == "true") {
$scope.samlAssertionSignature = true;
} else {
$scope.samlAssertionSignature = false;
}
}
- if ($scope.application.attributes["saml.client.signature"]) {
- if ($scope.application.attributes["saml.client.signature"] == "true") {
+ if ($scope.client.attributes["saml.client.signature"]) {
+ if ($scope.client.attributes["saml.client.signature"] == "true") {
$scope.samlClientSignature = true;
} else {
$scope.samlClientSignature = false;
}
}
- if ($scope.application.attributes["saml.encrypt"]) {
- if ($scope.application.attributes["saml.encrypt"] == "true") {
+ if ($scope.client.attributes["saml.encrypt"]) {
+ if ($scope.client.attributes["saml.encrypt"] == "true") {
$scope.samlEncrypt = true;
} else {
$scope.samlEncrypt = false;
}
}
- if ($scope.application.attributes["saml.authnstatement"]) {
- if ($scope.application.attributes["saml.authnstatement"] == "true") {
+ if ($scope.client.attributes["saml.authnstatement"]) {
+ if ($scope.client.attributes["saml.authnstatement"] == "true") {
$scope.samlAuthnStatement = true;
} else {
$scope.samlAuthnStatement = false;
}
}
- if ($scope.application.attributes["saml_force_name_id_format"]) {
- if ($scope.application.attributes["saml_force_name_id_format"] == "true") {
+ if ($scope.client.attributes["saml_force_name_id_format"]) {
+ if ($scope.client.attributes["saml_force_name_id_format"] == "true") {
$scope.samlForceNameIdFormat = true;
} else {
$scope.samlForceNameIdFormat = false;
}
}
- if ($scope.application.attributes["saml.multivalued.roles"]) {
- if ($scope.application.attributes["saml.multivalued.roles"] == "true") {
+ if ($scope.client.attributes["saml.multivalued.roles"]) {
+ if ($scope.client.attributes["saml.multivalued.roles"] == "true") {
$scope.samlMultiValuedRoles = true;
} else {
$scope.samlMultiValuedRoles = false;
}
}
- if ($scope.application.attributes["saml.force.post.binding"]) {
- if ($scope.application.attributes["saml.force.post.binding"] == "true") {
+ if ($scope.client.attributes["saml.force.post.binding"]) {
+ if ($scope.client.attributes["saml.force.post.binding"] == "true") {
$scope.samlForcePostBinding = true;
} else {
$scope.samlForcePostBinding = false;
@@ -667,31 +656,31 @@ module.controller('ApplicationDetailCtrl', function($scope, realm, application,
$scope.changeAccessType = function() {
if ($scope.accessType == "confidential") {
- $scope.application.bearerOnly = false;
- $scope.application.publicClient = false;
+ $scope.client.bearerOnly = false;
+ $scope.client.publicClient = false;
} else if ($scope.accessType == "public") {
- $scope.application.bearerOnly = false;
- $scope.application.publicClient = true;
+ $scope.client.bearerOnly = false;
+ $scope.client.publicClient = true;
} else if ($scope.accessType == "bearer-only") {
- $scope.application.bearerOnly = true;
- $scope.application.publicClient = false;
+ $scope.client.bearerOnly = true;
+ $scope.client.publicClient = false;
}
};
$scope.changeProtocol = function() {
if ($scope.protocol == "openid-connect") {
- $scope.application.protocol = "openid-connect";
+ $scope.client.protocol = "openid-connect";
} else if ($scope.accessType == "saml") {
- $scope.application.protocol = "saml";
+ $scope.client.protocol = "saml";
}
};
$scope.changeAlgorithm = function() {
- $scope.application.attributes['saml.signature.algorithm'] = $scope.signatureAlgorithm;
+ $scope.client.attributes['saml.signature.algorithm'] = $scope.signatureAlgorithm;
};
$scope.changeNameIdFormat = function() {
- $scope.application.attributes['saml_name_id_format'] = $scope.nameIdFormat;
+ $scope.client.attributes['saml_name_id_format'] = $scope.nameIdFormat;
};
$scope.$watch(function() {
@@ -700,125 +689,125 @@ module.controller('ApplicationDetailCtrl', function($scope, realm, application,
$scope.path = $location.path().substring(1).split("/");
});
- $scope.$watch('application', function() {
- if (!angular.equals($scope.application, application)) {
+ $scope.$watch('client', function() {
+ if (!angular.equals($scope.client, client)) {
$scope.changed = true;
}
}, true);
$scope.deleteWebOrigin = function(index) {
- $scope.application.webOrigins.splice(index, 1);
+ $scope.client.webOrigins.splice(index, 1);
}
$scope.addWebOrigin = function() {
- $scope.application.webOrigins.push($scope.newWebOrigin);
+ $scope.client.webOrigins.push($scope.newWebOrigin);
$scope.newWebOrigin = "";
}
$scope.deleteRedirectUri = function(index) {
- $scope.application.redirectUris.splice(index, 1);
+ $scope.client.redirectUris.splice(index, 1);
}
$scope.addRedirectUri = function() {
- $scope.application.redirectUris.push($scope.newRedirectUri);
+ $scope.client.redirectUris.push($scope.newRedirectUri);
$scope.newRedirectUri = "";
}
$scope.save = function() {
if ($scope.samlServerSignature == true) {
- $scope.application.attributes["saml.server.signature"] = "true";
+ $scope.client.attributes["saml.server.signature"] = "true";
} else {
- $scope.application.attributes["saml.server.signature"] = "false";
+ $scope.client.attributes["saml.server.signature"] = "false";
}
if ($scope.samlAssertionSignature == true) {
- $scope.application.attributes["saml.assertion.signature"] = "true";
+ $scope.client.attributes["saml.assertion.signature"] = "true";
} else {
- $scope.application.attributes["saml.assertion.signature"] = "false";
+ $scope.client.attributes["saml.assertion.signature"] = "false";
}
if ($scope.samlClientSignature == true) {
- $scope.application.attributes["saml.client.signature"] = "true";
+ $scope.client.attributes["saml.client.signature"] = "true";
} else {
- $scope.application.attributes["saml.client.signature"] = "false";
+ $scope.client.attributes["saml.client.signature"] = "false";
}
if ($scope.samlEncrypt == true) {
- $scope.application.attributes["saml.encrypt"] = "true";
+ $scope.client.attributes["saml.encrypt"] = "true";
} else {
- $scope.application.attributes["saml.encrypt"] = "false";
+ $scope.client.attributes["saml.encrypt"] = "false";
}
if ($scope.samlAuthnStatement == true) {
- $scope.application.attributes["saml.authnstatement"] = "true";
+ $scope.client.attributes["saml.authnstatement"] = "true";
} else {
- $scope.application.attributes["saml.authnstatement"] = "false";
+ $scope.client.attributes["saml.authnstatement"] = "false";
}
if ($scope.samlForceNameIdFormat == true) {
- $scope.application.attributes["saml_force_name_id_format"] = "true";
+ $scope.client.attributes["saml_force_name_id_format"] = "true";
} else {
- $scope.application.attributes["saml_force_name_id_format"] = "false";
+ $scope.client.attributes["saml_force_name_id_format"] = "false";
}
if ($scope.samlMultiValuedRoles == true) {
- $scope.application.attributes["saml.multivalued.roles"] = "true";
+ $scope.client.attributes["saml.multivalued.roles"] = "true";
} else {
- $scope.application.attributes["saml.multivalued.roles"] = "false";
+ $scope.client.attributes["saml.multivalued.roles"] = "false";
}
if ($scope.samlForcePostBinding == true) {
- $scope.application.attributes["saml.force.post.binding"] = "true";
+ $scope.client.attributes["saml.force.post.binding"] = "true";
} else {
- $scope.application.attributes["saml.force.post.binding"] = "false";
+ $scope.client.attributes["saml.force.post.binding"] = "false";
}
- $scope.application.protocol = $scope.protocol;
- $scope.application.attributes['saml.signature.algorithm'] = $scope.signatureAlgorithm;
- $scope.application.attributes['saml_name_id_format'] = $scope.nameIdFormat;
+ $scope.client.protocol = $scope.protocol;
+ $scope.client.attributes['saml.signature.algorithm'] = $scope.signatureAlgorithm;
+ $scope.client.attributes['saml_name_id_format'] = $scope.nameIdFormat;
- if ($scope.application.protocol != 'saml' && !$scope.application.bearerOnly && (!$scope.application.redirectUris || $scope.application.redirectUris.length == 0)) {
+ if ($scope.client.protocol != 'saml' && !$scope.client.bearerOnly && (!$scope.client.redirectUris || $scope.client.redirectUris.length == 0)) {
Notifications.error("You must specify at least one redirect uri");
} else {
if ($scope.create) {
- Application.save({
+ Client.save({
realm: realm.realm,
- application: ''
- }, $scope.application, function (data, headers) {
+ client: ''
+ }, $scope.client, function (data, headers) {
$scope.changed = false;
var l = headers().location;
var id = l.substring(l.lastIndexOf("/") + 1);
- $location.url("/realms/" + realm.realm + "/applications/" + id);
- Notifications.success("The application has been created.");
+ $location.url("/realms/" + realm.realm + "/clients/" + id);
+ Notifications.success("The client has been created.");
});
} else {
- Application.update({
+ Client.update({
realm : realm.realm,
- application : application.id
- }, $scope.application, function() {
+ client : client.id
+ }, $scope.client, function() {
$scope.changed = false;
- application = angular.copy($scope.application);
- $location.url("/realms/" + realm.realm + "/applications/" + application.id);
- Notifications.success("Your changes have been saved to the application.");
+ client = angular.copy($scope.client);
+ $location.url("/realms/" + realm.realm + "/clients/" + client.id);
+ Notifications.success("Your changes have been saved to the client.");
});
}
}
};
$scope.reset = function() {
- $scope.application = angular.copy(application);
+ $scope.client = angular.copy(client);
$scope.changed = false;
};
$scope.cancel = function() {
- $location.url("/realms/" + realm.realm + "/applications");
+ $location.url("/realms/" + realm.realm + "/clients");
};
$scope.remove = function() {
- Dialog.confirmDelete($scope.application.name, 'application', function() {
- $scope.application.$remove({
+ Dialog.confirmDelete($scope.client.clientId, 'client', function() {
+ $scope.client.$remove({
realm : realm.realm,
- application : $scope.application.id
+ client : $scope.client.id
}, function() {
- $location.url("/realms/" + realm.realm + "/applications");
- Notifications.success("The application has been deleted.");
+ $location.url("/realms/" + realm.realm + "/clients");
+ Notifications.success("The client has been deleted.");
});
});
};
@@ -826,33 +815,32 @@ module.controller('ApplicationDetailCtrl', function($scope, realm, application,
});
-module.controller('ApplicationScopeMappingCtrl', function($scope, $http, realm, application, applications, Notifications,
- Application,
- ApplicationRealmScopeMapping, ApplicationApplicationScopeMapping, ApplicationRole,
- ApplicationAvailableRealmScopeMapping, ApplicationAvailableApplicationScopeMapping,
- ApplicationCompositeRealmScopeMapping, ApplicationCompositeApplicationScopeMapping) {
+module.controller('ClientScopeMappingCtrl', function($scope, $http, realm, client, clients, Notifications,
+ Client,
+ ClientRealmScopeMapping, ClientClientScopeMapping, ClientRole,
+ ClientAvailableRealmScopeMapping, ClientAvailableClientScopeMapping,
+ ClientCompositeRealmScopeMapping, ClientCompositeClientScopeMapping) {
$scope.realm = realm;
- $scope.application = angular.copy(application);
+ $scope.client = angular.copy(client);
$scope.selectedRealmRoles = [];
$scope.selectedRealmMappings = [];
$scope.realmMappings = [];
- $scope.applications = applications;
- $scope.applicationRoles = [];
- $scope.applicationComposite = [];
- $scope.selectedApplicationRoles = [];
- $scope.selectedApplicationMappings = [];
- $scope.applicationMappings = [];
+ $scope.clients = clients;
+ $scope.clientRoles = [];
+ $scope.clientComposite = [];
+ $scope.selectedClientRoles = [];
+ $scope.selectedClientMappings = [];
+ $scope.clientMappings = [];
$scope.dummymodel = [];
$scope.changeFullScopeAllowed = function() {
- console.log('change full scope');
- Application.update({
+ Client.update({
realm : realm.realm,
- application : application.id
- }, $scope.application, function() {
+ client : client.id
+ }, $scope.client, function() {
$scope.changed = false;
- application = angular.copy($scope.application);
+ client = angular.copy($scope.client);
updateRealmRoles();
Notifications.success("Scope mappings updated.");
});
@@ -861,30 +849,29 @@ module.controller('ApplicationScopeMappingCtrl', function($scope, $http, realm,
function updateRealmRoles() {
- $scope.realmRoles = ApplicationAvailableRealmScopeMapping.query({realm : realm.realm, application : application.id});
- $scope.realmMappings = ApplicationRealmScopeMapping.query({realm : realm.realm, application : application.id});
- $scope.realmComposite = ApplicationCompositeRealmScopeMapping.query({realm : realm.realm, application : application.id});
+ $scope.realmRoles = ClientAvailableRealmScopeMapping.query({realm : realm.realm, client : client.id});
+ $scope.realmMappings = ClientRealmScopeMapping.query({realm : realm.realm, client : client.id});
+ $scope.realmComposite = ClientCompositeRealmScopeMapping.query({realm : realm.realm, client : client.id});
}
- function updateAppRoles() {
- if ($scope.targetApp) {
- console.debug($scope.targetApp.name);
- $scope.applicationRoles = ApplicationAvailableApplicationScopeMapping.query({realm : realm.realm, application : application.id, targetApp : $scope.targetApp.id});
- $scope.applicationMappings = ApplicationApplicationScopeMapping.query({realm : realm.realm, application : application.id, targetApp : $scope.targetApp.id});
- $scope.applicationComposite = ApplicationCompositeApplicationScopeMapping.query({realm : realm.realm, application : application.id, targetApp : $scope.targetApp.id});
+ function updateClientRoles() {
+ if ($scope.targetClient) {
+ $scope.clientRoles = ClientAvailableClientScopeMapping.query({realm : realm.realm, client : client.id, targetClient : $scope.targetClient.id});
+ $scope.clientMappings = ClientClientScopeMapping.query({realm : realm.realm, client : client.id, targetClient : $scope.targetClient.id});
+ $scope.clientComposite = ClientCompositeClientScopeMapping.query({realm : realm.realm, client : client.id, targetClient : $scope.targetClient.id});
} else {
- $scope.applicationRoles = null;
- $scope.applicationMappings = null;
- $scope.applicationComposite = null;
+ $scope.clientRoles = null;
+ $scope.clientMappings = null;
+ $scope.clientComposite = null;
}
}
- $scope.changeApplication = function() {
- updateAppRoles();
+ $scope.changeClient = function() {
+ updateClientRoles();
};
$scope.addRealmRole = function() {
- $http.post(authUrl + '/admin/realms/' + realm.realm + '/applications-by-id/' + application.id + '/scope-mappings/realm',
+ $http.post(authUrl + '/admin/realms/' + realm.realm + '/clients-by-id/' + client.id + '/scope-mappings/realm',
$scope.selectedRealmRoles).success(function() {
updateRealmRoles();
Notifications.success("Scope mappings updated.");
@@ -892,25 +879,25 @@ module.controller('ApplicationScopeMappingCtrl', function($scope, $http, realm,
};
$scope.deleteRealmRole = function() {
- $http.delete(authUrl + '/admin/realms/' + realm.realm + '/applications-by-id/' + application.id + '/scope-mappings/realm',
+ $http.delete(authUrl + '/admin/realms/' + realm.realm + '/clients-by-id/' + client.id + '/scope-mappings/realm',
{data : $scope.selectedRealmMappings, headers : {"content-type" : "application/json"}}).success(function () {
updateRealmRoles();
Notifications.success("Scope mappings updated.");
});
};
- $scope.addApplicationRole = function() {
- $http.post(authUrl + '/admin/realms/' + realm.realm + '/applications-by-id/' + application.id + '/scope-mappings/applications-by-id/' + $scope.targetApp.id,
- $scope.selectedApplicationRoles).success(function () {
- updateAppRoles();
+ $scope.addClientRole = function() {
+ $http.post(authUrl + '/admin/realms/' + realm.realm + '/clients-by-id/' + client.id + '/scope-mappings/clients-by-id/' + $scope.targetClient.id,
+ $scope.selectedClientRoles).success(function () {
+ updateClientRoles();
Notifications.success("Scope mappings updated.");
});
};
- $scope.deleteApplicationRole = function() {
- $http.delete(authUrl + '/admin/realms/' + realm.realm + '/applications-by-id/' + application.id + '/scope-mappings/applications-by-id/' + $scope.targetApp.id,
- {data : $scope.selectedApplicationMappings, headers : {"content-type" : "application/json"}}).success(function () {
- updateAppRoles();
+ $scope.deleteClientRole = function() {
+ $http.delete(authUrl + '/admin/realms/' + realm.realm + '/clients-by-id/' + client.id + '/scope-mappings/clients-by-id/' + $scope.targetClient.id,
+ {data : $scope.selectedClientMappings, headers : {"content-type" : "application/json"}}).success(function () {
+ updateClientRoles();
Notifications.success("Scope mappings updated.");
});
};
@@ -918,45 +905,45 @@ module.controller('ApplicationScopeMappingCtrl', function($scope, $http, realm,
updateRealmRoles();
});
-module.controller('ApplicationRevocationCtrl', function($scope, realm, application, Application, ApplicationPushRevocation, $location, Dialog, Notifications) {
+module.controller('ClientRevocationCtrl', function($scope, realm, client, Client, ClientPushRevocation, $location, Dialog, Notifications) {
$scope.realm = realm;
- $scope.application = application;
+ $scope.client = client;
var setNotBefore = function() {
- if ($scope.application.notBefore == 0) {
+ if ($scope.client.notBefore == 0) {
$scope.notBefore = "None";
} else {
- $scope.notBefore = new Date($scope.application.notBefore * 1000);
+ $scope.notBefore = new Date($scope.client.notBefore * 1000);
}
};
setNotBefore();
var refresh = function() {
- Application.get({ realm : realm.realm, application: $scope.application.id }, function(updated) {
- $scope.application = updated;
+ Client.get({ realm : realm.realm, client: $scope.client.id }, function(updated) {
+ $scope.client = updated;
setNotBefore();
})
};
$scope.clear = function() {
- $scope.application.notBefore = 0;
- Application.update({ realm : realm.realm, application: application.id}, $scope.application, function () {
+ $scope.client.notBefore = 0;
+ Client.update({ realm : realm.realm, client: client.id}, $scope.client, function () {
$scope.notBefore = "None";
- Notifications.success('Not Before cleared for application.');
+ Notifications.success('Not Before cleared for client.');
refresh();
});
}
$scope.setNotBeforeNow = function() {
- $scope.application.notBefore = new Date().getTime()/1000;
- Application.update({ realm : realm.realm, application: $scope.application.id}, $scope.application, function () {
- Notifications.success('Not Before set for application.');
+ $scope.client.notBefore = new Date().getTime()/1000;
+ Client.update({ realm : realm.realm, client: $scope.client.id}, $scope.client, function () {
+ Notifications.success('Not Before set for client.');
refresh();
});
}
$scope.pushRevocation = function() {
- ApplicationPushRevocation.save({realm : realm.realm, application: $scope.application.id}, function (globalReqResult) {
+ ClientPushRevocation.save({realm : realm.realm, client: $scope.client.id}, function (globalReqResult) {
var successCount = globalReqResult.successRequests ? globalReqResult.successRequests.length : 0;
var failedCount = globalReqResult.failedRequests ? globalReqResult.failedRequests.length : 0;
@@ -973,32 +960,32 @@ module.controller('ApplicationRevocationCtrl', function($scope, realm, applicati
});
-module.controller('ApplicationClusteringCtrl', function($scope, application, Application, ApplicationTestNodesAvailable, realm, $location, $route, Notifications, TimeUnit) {
- $scope.application = application;
+module.controller('ClientClusteringCtrl', function($scope, client, Client, ClientTestNodesAvailable, realm, $location, $route, Notifications, TimeUnit) {
+ $scope.client = client;
$scope.realm = realm;
- var oldCopy = angular.copy($scope.application);
+ var oldCopy = angular.copy($scope.client);
$scope.changed = false;
- $scope.$watch('application', function() {
- if (!angular.equals($scope.application, oldCopy)) {
+ $scope.$watch('client', function() {
+ if (!angular.equals($scope.client, oldCopy)) {
$scope.changed = true;
}
}, true);
- $scope.application.nodeReRegistrationTimeoutUnit = TimeUnit.autoUnit(application.nodeReRegistrationTimeout);
- $scope.application.nodeReRegistrationTimeout = TimeUnit.toUnit(application.nodeReRegistrationTimeout, $scope.application.nodeReRegistrationTimeoutUnit);
- $scope.$watch('application.nodeReRegistrationTimeoutUnit', function(to, from) {
- $scope.application.nodeReRegistrationTimeout = TimeUnit.convert($scope.application.nodeReRegistrationTimeout, from, to);
+ $scope.client.nodeReRegistrationTimeoutUnit = TimeUnit.autoUnit(client.nodeReRegistrationTimeout);
+ $scope.client.nodeReRegistrationTimeout = TimeUnit.toUnit(client.nodeReRegistrationTimeout, $scope.client.nodeReRegistrationTimeoutUnit);
+ $scope.$watch('client.nodeReRegistrationTimeoutUnit', function(to, from) {
+ $scope.client.nodeReRegistrationTimeout = TimeUnit.convert($scope.client.nodeReRegistrationTimeout, from, to);
});
$scope.save = function() {
- var appCopy = angular.copy($scope.application);
- delete appCopy['nodeReRegistrationTimeoutUnit'];
- appCopy.nodeReRegistrationTimeout = TimeUnit.toSeconds($scope.application.nodeReRegistrationTimeout, $scope.application.nodeReRegistrationTimeoutUnit)
- Application.update({ realm : realm.realm, application : application.id }, appCopy, function () {
+ var clientCopy = angular.copy($scope.client);
+ delete clientCopy['nodeReRegistrationTimeoutUnit'];
+ clientCopy.nodeReRegistrationTimeout = TimeUnit.toSeconds($scope.client.nodeReRegistrationTimeout, $scope.client.nodeReRegistrationTimeoutUnit)
+ Client.update({ realm : realm.realm, client : client.id }, clientCopy, function () {
$route.reload();
- Notifications.success('Your changes have been saved to the application.');
+ Notifications.success('Your changes have been saved to the client.');
});
};
@@ -1007,8 +994,7 @@ module.controller('ApplicationClusteringCtrl', function($scope, application, App
};
$scope.testNodesAvailable = function() {
- console.log('testNodesAvailable');
- ApplicationTestNodesAvailable.get({ realm : realm.realm, application : application.id }, function(globalReqResult) {
+ ClientTestNodesAvailable.get({ realm : realm.realm, client : client.id }, function(globalReqResult) {
$route.reload();
var successCount = globalReqResult.successRequests ? globalReqResult.successRequests.length : 0;
@@ -1025,12 +1011,12 @@ module.controller('ApplicationClusteringCtrl', function($scope, application, App
});
};
- if (application.registeredNodes) {
+ if (client.registeredNodes) {
var nodeRegistrations = [];
- for (node in application.registeredNodes) {
+ for (node in client.registeredNodes) {
reg = {
host: node,
- lastRegistration: new Date(application.registeredNodes[node] * 1000)
+ lastRegistration: new Date(client.registeredNodes[node] * 1000)
}
nodeRegistrations.push(reg);
}
@@ -1039,24 +1025,22 @@ module.controller('ApplicationClusteringCtrl', function($scope, application, App
};
});
-module.controller('ApplicationClusteringNodeCtrl', function($scope, application, Application, ApplicationClusterNode, realm, $location, $routeParams, Notifications) {
- $scope.application = application;
+module.controller('ClientClusteringNodeCtrl', function($scope, client, Client, ClientClusterNode, realm, $location, $routeParams, Notifications) {
+ $scope.client = client;
$scope.realm = realm;
$scope.create = !$routeParams.node;
$scope.save = function() {
- console.log('registerNode: ' + $scope.node.host);
- ApplicationClusterNode.save({ realm : realm.realm, application : application.id , node: $scope.node.host }, function() {
+ ClientClusterNode.save({ realm : realm.realm, client : client.id , node: $scope.node.host }, function() {
Notifications.success('Node ' + $scope.node.host + ' registered successfully.');
- $location.url('/realms/' + realm.realm + '/applications/' + application.id + '/clustering');
+ $location.url('/realms/' + realm.realm + '/clients/' + client.id + '/clustering');
});
}
$scope.unregisterNode = function() {
- console.log('unregisterNode: ' + $scope.node.host);
- ApplicationClusterNode.remove({ realm : realm.realm, application : application.id , node: $scope.node.host }, function() {
+ ClientClusterNode.remove({ realm : realm.realm, client : client.id , node: $scope.node.host }, function() {
Notifications.success('Node ' + $scope.node.host + ' unregistered successfully.');
- $location.url('/realms/' + realm.realm + '/applications/' + application.id + '/clustering');
+ $location.url('/realms/' + realm.realm + '/clients/' + client.id + '/clustering');
});
}
@@ -1064,7 +1048,7 @@ module.controller('ApplicationClusteringNodeCtrl', function($scope, application,
$scope.node = {}
$scope.registered = false;
} else {
- var lastRegTime = application.registeredNodes[$routeParams.node];
+ var lastRegTime = client.registeredNodes[$routeParams.node];
if (lastRegTime) {
$scope.registered = true;
@@ -1082,16 +1066,16 @@ module.controller('ApplicationClusteringNodeCtrl', function($scope, application,
}
});
-module.controller('ApplicationProtocolMapperListCtrl', function($scope, realm, application, serverInfo,
- ApplicationProtocolMappersByProtocol,
+module.controller('ClientProtocolMapperListCtrl', function($scope, realm, client, serverInfo,
+ ClientProtocolMappersByProtocol,
$http, $location, Dialog, Notifications) {
$scope.realm = realm;
- $scope.application = application;
- if (application.protocol == null) {
- application.protocol = 'openid-connect';
+ $scope.client = client;
+ if (client.protocol == null) {
+ client.protocol = 'openid-connect';
}
- var protocolMappers = serverInfo.protocolMapperTypes[application.protocol];
+ var protocolMappers = serverInfo.protocolMapperTypes[client.protocol];
var mapperTypes = {};
for (var i = 0; i < protocolMappers.length; i++) {
mapperTypes[protocolMappers[i].id] = protocolMappers[i];
@@ -1100,22 +1084,22 @@ module.controller('ApplicationProtocolMapperListCtrl', function($scope, realm, a
var updateMappers = function() {
- $scope.mappers = ApplicationProtocolMappersByProtocol.query({realm : realm.realm, application : application.id, protocol : application.protocol});
+ $scope.mappers = ClientProtocolMappersByProtocol.query({realm : realm.realm, client : client.id, protocol : client.protocol});
};
updateMappers();
});
-module.controller('AddBuiltinProtocolMapperCtrl', function($scope, realm, application, serverInfo,
- ApplicationProtocolMappersByProtocol,
+module.controller('AddBuiltinProtocolMapperCtrl', function($scope, realm, client, serverInfo,
+ ClientProtocolMappersByProtocol,
$http, $location, Dialog, Notifications) {
$scope.realm = realm;
- $scope.application = application;
- if (application.protocol == null) {
- application.protocol = 'openid-connect';
+ $scope.client = client;
+ if (client.protocol == null) {
+ client.protocol = 'openid-connect';
}
- var protocolMappers = serverInfo.protocolMapperTypes[application.protocol];
+ var protocolMappers = serverInfo.protocolMapperTypes[client.protocol];
var mapperTypes = {};
for (var i = 0; i < protocolMappers.length; i++) {
mapperTypes[protocolMappers[i].id] = protocolMappers[i];
@@ -1126,21 +1110,17 @@ module.controller('AddBuiltinProtocolMapperCtrl', function($scope, realm, applic
var updateMappers = function() {
- var appMappers = ApplicationProtocolMappersByProtocol.query({realm : realm.realm, application : application.id, protocol : application.protocol}, function() {
- var builtinMappers = serverInfo.builtinProtocolMappers[application.protocol];
- for (var i = 0; i < appMappers.length; i++) {
+ var clientMappers = ClientProtocolMappersByProtocol.query({realm : realm.realm, client : client.id, protocol : client.protocol}, function() {
+ var builtinMappers = serverInfo.builtinProtocolMappers[client.protocol];
+ for (var i = 0; i < clientMappers.length; i++) {
for (var j = 0; j < builtinMappers.length; j++) {
- if (builtinMappers[j].name == appMappers[i].name
- && builtinMappers[j].protocolMapper == appMappers[i].protocolMapper) {
- console.log('removing: ' + builtinMappers[j].name);
+ if (builtinMappers[j].name == clientMappers[i].name
+ && builtinMappers[j].protocolMapper == clientMappers[i].protocolMapper) {
builtinMappers.splice(j, 1);
break;
}
}
}
- for (var j = 0; j < builtinMappers.length; j++) {
- console.log('builtin left: ' + builtinMappers[j].name);
- }
$scope.mappers = builtinMappers;
for (var i = 0; i < $scope.mappers.length; i++) {
$scope.mappers[i].isChecked = false;
@@ -1160,32 +1140,32 @@ module.controller('AddBuiltinProtocolMapperCtrl', function($scope, realm, applic
toAdd.push($scope.mappers[i]);
}
}
- $http.post(authUrl + '/admin/realms/' + realm.realm + '/applications-by-id/' + application.id + '/protocol-mappers/add-models',
+ $http.post(authUrl + '/admin/realms/' + realm.realm + '/clients-by-id/' + client.id + '/protocol-mappers/add-models',
toAdd).success(function() {
Notifications.success("Mappers added");
- $location.url('/realms/' + realm.realm + '/applications/' + application.id + '/mappers');
+ $location.url('/realms/' + realm.realm + '/clients/' + client.id + '/mappers');
}).error(function() {
Notifications.error("Error adding mappers");
- $location.url('/realms/' + realm.realm + '/applications/' + application.id + '/mappers');
+ $location.url('/realms/' + realm.realm + '/clients/' + client.id + '/mappers');
});
};
});
-module.controller('ApplicationProtocolMapperCtrl', function($scope, realm, serverInfo, application, mapper, ApplicationProtocolMapper, Notifications, Dialog, $location) {
+module.controller('ClientProtocolMapperCtrl', function($scope, realm, serverInfo, client, mapper, ClientProtocolMapper, Notifications, Dialog, $location) {
$scope.realm = realm;
- $scope.application = application;
+ $scope.client = client;
$scope.create = false;
- if (application.protocol == null) {
- application.protocol = 'openid-connect';
+ if (client.protocol == null) {
+ client.protocol = 'openid-connect';
}
- $scope.protocol = application.protocol;
+ $scope.protocol = client.protocol;
$scope.mapper = angular.copy(mapper);
$scope.changed = false;
$scope.boolval = true;
$scope.boolvalId = 'boolval';
- var protocolMappers = serverInfo.protocolMapperTypes[application.protocol];
+ var protocolMappers = serverInfo.protocolMapperTypes[client.protocol];
for (var i = 0; i < protocolMappers.length; i++) {
if (protocolMappers[i].id == mapper.protocolMapper) {
$scope.mapperType = protocolMappers[i];
@@ -1204,14 +1184,14 @@ module.controller('ApplicationProtocolMapperCtrl', function($scope, realm, serve
}, true);
$scope.save = function() {
- ApplicationProtocolMapper.update({
+ ClientProtocolMapper.update({
realm : realm.realm,
- application: application.id,
+ client: client.id,
id : mapper.id
}, $scope.mapper, function() {
$scope.changed = false;
mapper = angular.copy($scope.mapper);
- $location.url("/realms/" + realm.realm + '/applications/' + application.id + "/mappers/" + mapper.id);
+ $location.url("/realms/" + realm.realm + '/clients/' + client.id + "/mappers/" + mapper.id);
Notifications.success("Your changes have been saved.");
});
};
@@ -1228,25 +1208,25 @@ module.controller('ApplicationProtocolMapperCtrl', function($scope, realm, serve
$scope.remove = function() {
Dialog.confirmDelete($scope.mapper.name, 'mapper', function() {
- ApplicationProtocolMapper.remove({ realm: realm.realm, application: application.id, id : $scope.mapper.id }, function() {
+ ClientProtocolMapper.remove({ realm: realm.realm, client: client.id, id : $scope.mapper.id }, function() {
Notifications.success("The mapper has been deleted.");
- $location.url("/realms/" + realm.realm + '/applications/' + application.id + "/mappers");
+ $location.url("/realms/" + realm.realm + '/clients/' + client.id + "/mappers");
});
});
};
});
-module.controller('ApplicationProtocolMapperCreateCtrl', function($scope, realm, serverInfo, application, ApplicationProtocolMapper, Notifications, Dialog, $location) {
+module.controller('ClientProtocolMapperCreateCtrl', function($scope, realm, serverInfo, client, ClientProtocolMapper, Notifications, Dialog, $location) {
$scope.realm = realm;
- $scope.application = application;
+ $scope.client = client;
$scope.create = true;
- if (application.protocol == null) {
- application.protocol = 'openid-connect';
+ if (client.protocol == null) {
+ client.protocol = 'openid-connect';
}
- var protocol = application.protocol;
+ var protocol = client.protocol;
$scope.protocol = protocol;
- $scope.mapper = { protocol : application.protocol, config: {}};
+ $scope.mapper = { protocol : client.protocol, config: {}};
$scope.mapperTypes = serverInfo.protocolMapperTypes[protocol];
$scope.$watch(function() {
@@ -1257,12 +1237,12 @@ module.controller('ApplicationProtocolMapperCreateCtrl', function($scope, realm,
$scope.save = function() {
$scope.mapper.protocolMapper = $scope.mapperType.id;
- ApplicationProtocolMapper.save({
- realm : realm.realm, application: application.id
+ ClientProtocolMapper.save({
+ realm : realm.realm, client: client.id
}, $scope.mapper, function(data, headers) {
var l = headers().location;
var id = l.substring(l.lastIndexOf("/") + 1);
- $location.url("/realms/" + realm.realm + '/applications/' + application.id + "/mappers/" + id);
+ $location.url("/realms/" + realm.realm + '/clients/' + client.id + "/mappers/" + id);
Notifications.success("Mapper has been created.");
});
};
diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js b/forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js
index 750d4825475..97c1bdaa7a1 100755
--- a/forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js
+++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js
@@ -476,7 +476,7 @@ module.controller('RealmRequiredCredentialsCtrl', function($scope, Realm, realm,
};
});
-module.controller('RealmDefaultRolesCtrl', function ($scope, Realm, realm, applications, roles, Notifications, ApplicationRole, Application) {
+module.controller('RealmDefaultRolesCtrl', function ($scope, Realm, realm, clients, roles, Notifications, ClientRole, Client) {
console.log('RealmDefaultRolesCtrl');
@@ -486,17 +486,17 @@ module.controller('RealmDefaultRolesCtrl', function ($scope, Realm, realm, appli
$scope.selectedRealmRoles = [];
$scope.selectedRealmDefRoles = [];
- $scope.applications = angular.copy(applications);
- for (var i = 0; i < applications.length; i++) {
- if (applications[i].name == 'account') {
- $scope.application = $scope.applications[i];
+ $scope.clients = angular.copy(clients);
+ for (var i = 0; i < clients.length; i++) {
+ if (clients[i].name == 'account') {
+ $scope.client = $scope.clients[i];
break;
}
}
- $scope.availableAppRoles = [];
- $scope.selectedAppRoles = [];
- $scope.selectedAppDefRoles = [];
+ $scope.availableClientRoles = [];
+ $scope.selectedClientRoles = [];
+ $scope.selectedClientDefRoles = [];
if (!$scope.realm.hasOwnProperty('defaultRoles') || $scope.realm.defaultRoles === null) {
$scope.realm.defaultRoles = [];
@@ -550,81 +550,81 @@ module.controller('RealmDefaultRolesCtrl', function ($scope, Realm, realm, appli
});
};
- $scope.changeApplication = function () {
+ $scope.changeClient = function () {
- $scope.selectedAppRoles = [];
- $scope.selectedAppDefRoles = [];
+ $scope.selectedClientRoles = [];
+ $scope.selectedClientDefRoles = [];
- // Populate available roles for selected application
- if ($scope.application) {
- var appDefaultRoles = ApplicationRole.query({realm: $scope.realm.realm, application: $scope.application.id}, function () {
+ // Populate available roles for selected client
+ if ($scope.client) {
+ var appDefaultRoles = ClientRole.query({realm: $scope.realm.realm, client: $scope.client.id}, function () {
- if (!$scope.application.hasOwnProperty('defaultRoles') || $scope.application.defaultRoles === null) {
- $scope.application.defaultRoles = [];
+ if (!$scope.client.hasOwnProperty('defaultRoles') || $scope.client.defaultRoles === null) {
+ $scope.client.defaultRoles = [];
}
- $scope.availableAppRoles = [];
+ $scope.availableClientRoles = [];
for (var i = 0; i < appDefaultRoles.length; i++) {
var roleName = appDefaultRoles[i].name;
- if ($scope.application.defaultRoles.indexOf(roleName) < 0) {
- $scope.availableAppRoles.push(roleName);
+ if ($scope.client.defaultRoles.indexOf(roleName) < 0) {
+ $scope.availableClientRoles.push(roleName);
}
}
});
} else {
- $scope.availableAppRoles = null;
+ $scope.availableClientRoles = null;
}
};
- $scope.addAppDefaultRole = function () {
+ $scope.addClientDefaultRole = function () {
// Remove selected roles from the app available roles and add them to app default roles (move from left to right).
- for (var i = 0; i < $scope.selectedAppRoles.length; i++) {
- var role = $scope.selectedAppRoles[i];
+ for (var i = 0; i < $scope.selectedClientRoles.length; i++) {
+ var role = $scope.selectedClientRoles[i];
- var idx = $scope.application.defaultRoles.indexOf(role);
+ var idx = $scope.client.defaultRoles.indexOf(role);
if (idx < 0) {
- $scope.application.defaultRoles.push(role);
+ $scope.client.defaultRoles.push(role);
}
- idx = $scope.availableAppRoles.indexOf(role);
+ idx = $scope.availableClientRoles.indexOf(role);
if (idx != -1) {
- $scope.availableAppRoles.splice(idx, 1);
+ $scope.availableClientRoles.splice(idx, 1);
}
}
- // Update/save the selected application with new default roles.
- Application.update({
+ // Update/save the selected client with new default roles.
+ Client.update({
realm: $scope.realm.realm,
- application: $scope.application.id
- }, $scope.application, function () {
- Notifications.success("Your changes have been saved to the application.");
+ client: $scope.client.id
+ }, $scope.client, function () {
+ Notifications.success("Your changes have been saved to the client.");
});
};
- $scope.rmAppDefaultRole = function () {
+ $scope.rmClientDefaultRole = function () {
// Remove selected roles from the app default roles and add them to app available roles (move from right to left).
- for (var i = 0; i < $scope.selectedAppDefRoles.length; i++) {
- var role = $scope.selectedAppDefRoles[i];
- var idx = $scope.application.defaultRoles.indexOf(role);
+ for (var i = 0; i < $scope.selectedClientDefRoles.length; i++) {
+ var role = $scope.selectedClientDefRoles[i];
+ var idx = $scope.client.defaultRoles.indexOf(role);
if (idx != -1) {
- $scope.application.defaultRoles.splice(idx, 1);
+ $scope.client.defaultRoles.splice(idx, 1);
}
- idx = $scope.availableAppRoles.indexOf(role);
+ idx = $scope.availableClientRoles.indexOf(role);
if (idx < 0) {
- $scope.availableAppRoles.push(role);
+ $scope.availableClientRoles.push(role);
}
}
- // Update/save the selected application with new default roles.
- Application.update({
+ // Update/save the selected client with new default roles.
+ Client.update({
realm: $scope.realm.realm,
- application: $scope.application.id
- }, $scope.application, function () {
- Notifications.success("Your changes have been saved to the application.");
+ client: $scope.client.id
+ }, $scope.client, function () {
+ Notifications.success("Your changes have been saved to the client.");
});
};
@@ -848,7 +848,7 @@ module.controller('RealmIdentityProviderCtrl', function($scope, $filter, $upload
alias : $scope.identityProvider.alias
}, function() {
$location.url("/realms/" + realm.realm + "/identity-provider-settings");
- Notifications.success("The application has been deleted.");
+ Notifications.success("The client has been deleted.");
});
});
};
@@ -1008,7 +1008,7 @@ module.controller('RealmKeysDetailCtrl', function($scope, Realm, realm, $http, $
};
});
-module.controller('RealmSessionStatsCtrl', function($scope, realm, stats, RealmApplicationSessionStats, RealmLogoutAll, Notifications) {
+module.controller('RealmSessionStatsCtrl', function($scope, realm, stats, RealmClientSessionStats, RealmLogoutAll, Notifications) {
$scope.realm = realm;
$scope.stats = stats;
@@ -1073,7 +1073,7 @@ module.controller('RealmRevocationCtrl', function($scope, Realm, RealmPushRevoca
var msgStart = successCount>0 ? 'Successfully push notBefore to: ' + globalReqResult.successRequests + ' . ' : '';
Notifications.error(msgStart + 'Failed to push notBefore to: ' + globalReqResult.failedRequests + '. Verify availability of failed hosts and try again');
} else {
- Notifications.success('Successfully push notBefore to all configured applications');
+ Notifications.success('Successfully push notBefore to all configured clients');
}
});
}
@@ -1094,8 +1094,8 @@ module.controller('RoleListCtrl', function($scope, $location, realm, roles) {
});
-module.controller('RoleDetailCtrl', function($scope, realm, role, roles, applications,
- Role, ApplicationRole, RoleById, RoleRealmComposites, RoleApplicationComposites,
+module.controller('RoleDetailCtrl', function($scope, realm, role, roles, clients,
+ Role, ClientRole, RoleById, RoleRealmComposites, RoleClientComposites,
$http, $location, Dialog, Notifications) {
$scope.realm = realm;
$scope.role = angular.copy(role);
@@ -1141,8 +1141,8 @@ module.controller('RoleDetailCtrl', function($scope, realm, role, roles, applica
- roleControl($scope, realm, role, roles, applications,
- ApplicationRole, RoleById, RoleRealmComposites, RoleApplicationComposites,
+ roleControl($scope, realm, role, roles, clients,
+ ClientRole, RoleById, RoleRealmComposites, RoleClientComposites,
$http, $location, Notifications, Dialog);
});
diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/users.js b/forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/users.js
index 3d50839a9ca..30003bd05a0 100755
--- a/forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/users.js
+++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/users.js
@@ -1,17 +1,17 @@
-module.controller('UserRoleMappingCtrl', function($scope, $http, realm, user, applications, Notifications, RealmRoleMapping,
- ApplicationRoleMapping, AvailableRealmRoleMapping, AvailableApplicationRoleMapping,
- CompositeRealmRoleMapping, CompositeApplicationRoleMapping) {
+module.controller('UserRoleMappingCtrl', function($scope, $http, realm, user, clients, Notifications, RealmRoleMapping,
+ ClientRoleMapping, AvailableRealmRoleMapping, AvailableClientRoleMapping,
+ CompositeRealmRoleMapping, CompositeClientRoleMapping) {
$scope.realm = realm;
$scope.user = user;
$scope.selectedRealmRoles = [];
$scope.selectedRealmMappings = [];
$scope.realmMappings = [];
- $scope.applications = applications;
- $scope.applicationRoles = [];
- $scope.applicationComposite = [];
- $scope.selectedApplicationRoles = [];
- $scope.selectedApplicationMappings = [];
- $scope.applicationMappings = [];
+ $scope.clients = clients;
+ $scope.clientRoles = [];
+ $scope.clientComposite = [];
+ $scope.selectedClientRoles = [];
+ $scope.selectedClientMappings = [];
+ $scope.clientMappings = [];
$scope.dummymodel = [];
$scope.realmMappings = RealmRoleMapping.query({realm : realm.realm, userId : user.username});
@@ -26,13 +26,13 @@ module.controller('UserRoleMappingCtrl', function($scope, $http, realm, user, ap
$scope.realmComposite = CompositeRealmRoleMapping.query({realm : realm.realm, userId : user.username});
$scope.selectedRealmMappings = [];
$scope.selectRealmRoles = [];
- if ($scope.application) {
+ if ($scope.client) {
console.log('load available');
- $scope.applicationComposite = CompositeApplicationRoleMapping.query({realm : realm.realm, userId : user.username, application : $scope.application.id});
- $scope.applicationRoles = AvailableApplicationRoleMapping.query({realm : realm.realm, userId : user.username, application : $scope.application.id});
- $scope.applicationMappings = ApplicationRoleMapping.query({realm : realm.realm, userId : user.username, application : $scope.application.id});
- $scope.selectedApplicationRoles = [];
- $scope.selectedApplicationMappings = [];
+ $scope.clientComposite = CompositeClientRoleMapping.query({realm : realm.realm, userId : user.username, client : $scope.client.id});
+ $scope.clientRoles = AvailableClientRoleMapping.query({realm : realm.realm, userId : user.username, client : $scope.client.id});
+ $scope.clientMappings = ClientRoleMapping.query({realm : realm.realm, userId : user.username, client : $scope.client.id});
+ $scope.selectedClientRoles = [];
+ $scope.selectedClientMappings = [];
}
Notifications.success("Role mappings updated.");
@@ -47,57 +47,57 @@ module.controller('UserRoleMappingCtrl', function($scope, $http, realm, user, ap
$scope.realmComposite = CompositeRealmRoleMapping.query({realm : realm.realm, userId : user.username});
$scope.selectedRealmMappings = [];
$scope.selectRealmRoles = [];
- if ($scope.application) {
+ if ($scope.client) {
console.log('load available');
- $scope.applicationComposite = CompositeApplicationRoleMapping.query({realm : realm.realm, userId : user.username, application : $scope.application.id});
- $scope.applicationRoles = AvailableApplicationRoleMapping.query({realm : realm.realm, userId : user.username, application : $scope.application.id});
- $scope.applicationMappings = ApplicationRoleMapping.query({realm : realm.realm, userId : user.username, application : $scope.application.id});
- $scope.selectedApplicationRoles = [];
- $scope.selectedApplicationMappings = [];
+ $scope.clientComposite = CompositeClientRoleMapping.query({realm : realm.realm, userId : user.username, client : $scope.client.id});
+ $scope.clientRoles = AvailableClientRoleMapping.query({realm : realm.realm, userId : user.username, client : $scope.client.id});
+ $scope.clientMappings = ClientRoleMapping.query({realm : realm.realm, userId : user.username, client : $scope.client.id});
+ $scope.selectedClientRoles = [];
+ $scope.selectedClientMappings = [];
}
Notifications.success("Role mappings updated.");
});
};
- $scope.addApplicationRole = function() {
- $http.post(authUrl + '/admin/realms/' + realm.realm + '/users/' + user.username + '/role-mappings/applications-by-id/' + $scope.application.id,
- $scope.selectedApplicationRoles).success(function() {
- $scope.applicationMappings = ApplicationRoleMapping.query({realm : realm.realm, userId : user.username, application : $scope.application.id});
- $scope.applicationRoles = AvailableApplicationRoleMapping.query({realm : realm.realm, userId : user.username, application : $scope.application.id});
- $scope.applicationComposite = CompositeApplicationRoleMapping.query({realm : realm.realm, userId : user.username, application : $scope.application.id});
- $scope.selectedApplicationRoles = [];
- $scope.selectedApplicationMappings = [];
+ $scope.addClientRole = function() {
+ $http.post(authUrl + '/admin/realms/' + realm.realm + '/users/' + user.username + '/role-mappings/clients-by-id/' + $scope.client.id,
+ $scope.selectedClientRoles).success(function() {
+ $scope.clientMappings = ClientRoleMapping.query({realm : realm.realm, userId : user.username, client : $scope.client.id});
+ $scope.clientRoles = AvailableClientRoleMapping.query({realm : realm.realm, userId : user.username, client : $scope.client.id});
+ $scope.clientComposite = CompositeClientRoleMapping.query({realm : realm.realm, userId : user.username, client : $scope.client.id});
+ $scope.selectedClientRoles = [];
+ $scope.selectedClientMappings = [];
Notifications.success("Role mappings updated.");
});
};
- $scope.deleteApplicationRole = function() {
- $http.delete(authUrl + '/admin/realms/' + realm.realm + '/users/' + user.username + '/role-mappings/applications-by-id/' + $scope.application.id,
- {data : $scope.selectedApplicationMappings, headers : {"content-type" : "application/json"}}).success(function() {
- $scope.applicationMappings = ApplicationRoleMapping.query({realm : realm.realm, userId : user.username, application : $scope.application.id});
- $scope.applicationRoles = AvailableApplicationRoleMapping.query({realm : realm.realm, userId : user.username, application : $scope.application.id});
- $scope.applicationComposite = CompositeApplicationRoleMapping.query({realm : realm.realm, userId : user.username, application : $scope.application.id});
- $scope.selectedApplicationRoles = [];
- $scope.selectedApplicationMappings = [];
+ $scope.deleteClientRole = function() {
+ $http.delete(authUrl + '/admin/realms/' + realm.realm + '/users/' + user.username + '/role-mappings/clients-by-id/' + $scope.client.id,
+ {data : $scope.selectedClientMappings, headers : {"content-type" : "application/json"}}).success(function() {
+ $scope.clientMappings = ClientRoleMapping.query({realm : realm.realm, userId : user.username, client : $scope.client.id});
+ $scope.clientRoles = AvailableClientRoleMapping.query({realm : realm.realm, userId : user.username, client : $scope.client.id});
+ $scope.clientComposite = CompositeClientRoleMapping.query({realm : realm.realm, userId : user.username, client : $scope.client.id});
+ $scope.selectedClientRoles = [];
+ $scope.selectedClientMappings = [];
Notifications.success("Role mappings updated.");
});
};
- $scope.changeApplication = function() {
- console.log('changeApplication');
- if ($scope.application) {
+ $scope.changeClient = function() {
+ console.log('changeClient');
+ if ($scope.client) {
console.log('load available');
- $scope.applicationComposite = CompositeApplicationRoleMapping.query({realm : realm.realm, userId : user.username, application : $scope.application.id});
- $scope.applicationRoles = AvailableApplicationRoleMapping.query({realm : realm.realm, userId : user.username, application : $scope.application.id});
- $scope.applicationMappings = ApplicationRoleMapping.query({realm : realm.realm, userId : user.username, application : $scope.application.id});
+ $scope.clientComposite = CompositeClientRoleMapping.query({realm : realm.realm, userId : user.username, client : $scope.client.id});
+ $scope.clientRoles = AvailableClientRoleMapping.query({realm : realm.realm, userId : user.username, client : $scope.client.id});
+ $scope.clientMappings = ClientRoleMapping.query({realm : realm.realm, userId : user.username, client : $scope.client.id});
} else {
- $scope.applicationRoles = null;
- $scope.applicationMappings = null;
- $scope.applicationComposite = null;
+ $scope.clientRoles = null;
+ $scope.clientMappings = null;
+ $scope.clientComposite = null;
}
- $scope.selectedApplicationRoles = [];
- $scope.selectedApplicationMappings = [];
+ $scope.selectedClientRoles = [];
+ $scope.selectedClientMappings = [];
};
@@ -111,7 +111,7 @@ module.controller('UserSessionsCtrl', function($scope, realm, user, sessions, Us
$scope.logoutAll = function() {
UserLogout.save({realm : realm.realm, user: user.username}, function () {
- Notifications.success('Logged out user in all applications');
+ Notifications.success('Logged out user in all clients');
UserSessions.query({realm: realm.realm, user: user.username}, function(updated) {
$scope.sessions = updated;
})
diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/js/loaders.js b/forms/common-themes/src/main/resources/theme/base/admin/resources/js/loaders.js
index 7223ae55920..b6e05419995 100755
--- a/forms/common-themes/src/main/resources/theme/base/admin/resources/js/loaders.js
+++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/js/loaders.js
@@ -71,19 +71,19 @@ module.factory('RealmSessionStatsLoader', function(Loader, RealmSessionStats, $r
});
});
-module.factory('RealmApplicationSessionStatsLoader', function(Loader, RealmApplicationSessionStats, $route, $q) {
- return Loader.query(RealmApplicationSessionStats, function() {
+module.factory('RealmClientSessionStatsLoader', function(Loader, RealmClientSessionStats, $route, $q) {
+ return Loader.query(RealmClientSessionStats, function() {
return {
realm : $route.current.params.realm
}
});
});
-module.factory('ApplicationProtocolMapperLoader', function(Loader, ApplicationProtocolMapper, $route, $q) {
- return Loader.get(ApplicationProtocolMapper, function() {
+module.factory('ClientProtocolMapperLoader', function(Loader, ClientProtocolMapper, $route, $q) {
+ return Loader.get(ClientProtocolMapper, function() {
return {
realm : $route.current.params.realm,
- application : $route.current.params.application,
+ client : $route.current.params.client,
id: $route.current.params.id
}
});
@@ -164,74 +164,74 @@ module.factory('RoleListLoader', function(Loader, Role, $route, $q) {
});
});
-module.factory('ApplicationRoleLoader', function(Loader, RoleById, $route, $q) {
+module.factory('ClientRoleLoader', function(Loader, RoleById, $route, $q) {
return Loader.get(RoleById, function() {
return {
realm : $route.current.params.realm,
- application : $route.current.params.application,
+ client : $route.current.params.client,
role : $route.current.params.role
}
});
});
-module.factory('ApplicationSessionStatsLoader', function(Loader, ApplicationSessionStats, $route, $q) {
- return Loader.get(ApplicationSessionStats, function() {
+module.factory('ClientSessionStatsLoader', function(Loader, ClientSessionStats, $route, $q) {
+ return Loader.get(ClientSessionStats, function() {
return {
realm : $route.current.params.realm,
- application : $route.current.params.application
+ client : $route.current.params.client
}
});
});
-module.factory('ApplicationSessionCountLoader', function(Loader, ApplicationSessionCount, $route, $q) {
- return Loader.get(ApplicationSessionCount, function() {
+module.factory('ClientSessionCountLoader', function(Loader, ClientSessionCount, $route, $q) {
+ return Loader.get(ClientSessionCount, function() {
return {
realm : $route.current.params.realm,
- application : $route.current.params.application
+ client : $route.current.params.client
}
});
});
-module.factory('ApplicationClaimsLoader', function(Loader, ApplicationClaims, $route, $q) {
- return Loader.get(ApplicationClaims, function() {
+module.factory('ClientClaimsLoader', function(Loader, ClientClaims, $route, $q) {
+ return Loader.get(ClientClaims, function() {
return {
realm : $route.current.params.realm,
- application : $route.current.params.application
+ client : $route.current.params.client
}
});
});
-module.factory('ApplicationInstallationLoader', function(Loader, ApplicationInstallation, $route, $q) {
- return Loader.get(ApplicationInstallation, function() {
+module.factory('ClientInstallationLoader', function(Loader, ClientInstallation, $route, $q) {
+ return Loader.get(ClientInstallation, function() {
return {
realm : $route.current.params.realm,
- application : $route.current.params.application
+ client : $route.current.params.client
}
});
});
-module.factory('ApplicationRoleListLoader', function(Loader, ApplicationRole, $route, $q) {
- return Loader.query(ApplicationRole, function() {
+module.factory('ClientRoleListLoader', function(Loader, ClientRole, $route, $q) {
+ return Loader.query(ClientRole, function() {
return {
realm : $route.current.params.realm,
- application : $route.current.params.application
+ client : $route.current.params.client
}
});
});
-module.factory('ApplicationLoader', function(Loader, Application, $route, $q) {
- return Loader.get(Application, function() {
+module.factory('ClientLoader', function(Loader, Client, $route, $q) {
+ return Loader.get(Client, function() {
return {
realm : $route.current.params.realm,
- application : $route.current.params.application
+ client : $route.current.params.client
}
});
});
-module.factory('ApplicationListLoader', function(Loader, Application, $route, $q) {
- return Loader.query(Application, function() {
+module.factory('ClientListLoader', function(Loader, Client, $route, $q) {
+ return Loader.query(Client, function() {
return {
realm : $route.current.params.realm
}
@@ -240,7 +240,7 @@ module.factory('ApplicationListLoader', function(Loader, Application, $route, $q
module.factory('RoleMappingLoader', function(Loader, RoleMapping, $route, $q) {
- var realm = $route.current.params.realm || $route.current.params.application;
+ var realm = $route.current.params.realm || $route.current.params.client;
return Loader.query(RoleMapping, function() {
return {
diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/js/services.js b/forms/common-themes/src/main/resources/theme/base/admin/resources/js/services.js
index 805bc01319d..da0b2eb1a79 100755
--- a/forms/common-themes/src/main/resources/theme/base/admin/resources/js/services.js
+++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/js/services.js
@@ -190,10 +190,10 @@ module.factory('ServerInfo', function($resource) {
-module.factory('ApplicationProtocolMapper', function($resource) {
- return $resource(authUrl + '/admin/realms/:realm/applications-by-id/:application/protocol-mappers/models/:id', {
+module.factory('ClientProtocolMapper', function($resource) {
+ return $resource(authUrl + '/admin/realms/:realm/clients-by-id/:client/protocol-mappers/models/:id', {
realm : '@realm',
- application: '@application',
+ client: '@client',
id : "@id"
}, {
update : {
@@ -324,72 +324,72 @@ module.factory('AvailableRealmRoleMapping', function($resource) {
});
-module.factory('ApplicationRoleMapping', function($resource) {
- return $resource(authUrl + '/admin/realms/:realm/users/:userId/role-mappings/applications-by-id/:application', {
+module.factory('ClientRoleMapping', function($resource) {
+ return $resource(authUrl + '/admin/realms/:realm/users/:userId/role-mappings/clients-by-id/:client', {
realm : '@realm',
userId : '@userId',
- application : "@application"
+ client : "@client"
});
});
-module.factory('AvailableApplicationRoleMapping', function($resource) {
- return $resource(authUrl + '/admin/realms/:realm/users/:userId/role-mappings/applications-by-id/:application/available', {
+module.factory('AvailableClientRoleMapping', function($resource) {
+ return $resource(authUrl + '/admin/realms/:realm/users/:userId/role-mappings/clients-by-id/:client/available', {
realm : '@realm',
userId : '@userId',
- application : "@application"
+ client : "@client"
});
});
-module.factory('CompositeApplicationRoleMapping', function($resource) {
- return $resource(authUrl + '/admin/realms/:realm/users/:userId/role-mappings/applications-by-id/:application/composite', {
+module.factory('CompositeClientRoleMapping', function($resource) {
+ return $resource(authUrl + '/admin/realms/:realm/users/:userId/role-mappings/clients-by-id/:client/composite', {
realm : '@realm',
userId : '@userId',
- application : "@application"
+ client : "@client"
});
});
-module.factory('ApplicationRealmScopeMapping', function($resource) {
- return $resource(authUrl + '/admin/realms/:realm/applications-by-id/:application/scope-mappings/realm', {
+module.factory('ClientRealmScopeMapping', function($resource) {
+ return $resource(authUrl + '/admin/realms/:realm/clients-by-id/:client/scope-mappings/realm', {
realm : '@realm',
- application : '@application'
+ client : '@client'
});
});
-module.factory('ApplicationAvailableRealmScopeMapping', function($resource) {
- return $resource(authUrl + '/admin/realms/:realm/applications-by-id/:application/scope-mappings/realm/available', {
+module.factory('ClientAvailableRealmScopeMapping', function($resource) {
+ return $resource(authUrl + '/admin/realms/:realm/clients-by-id/:client/scope-mappings/realm/available', {
realm : '@realm',
- application : '@application'
+ client : '@client'
});
});
-module.factory('ApplicationCompositeRealmScopeMapping', function($resource) {
- return $resource(authUrl + '/admin/realms/:realm/applications-by-id/:application/scope-mappings/realm/composite', {
+module.factory('ClientCompositeRealmScopeMapping', function($resource) {
+ return $resource(authUrl + '/admin/realms/:realm/clients-by-id/:client/scope-mappings/realm/composite', {
realm : '@realm',
- application : '@application'
+ client : '@client'
});
});
-module.factory('ApplicationApplicationScopeMapping', function($resource) {
- return $resource(authUrl + '/admin/realms/:realm/applications-by-id/:application/scope-mappings/applications-by-id/:targetApp', {
+module.factory('ClientClientScopeMapping', function($resource) {
+ return $resource(authUrl + '/admin/realms/:realm/clients-by-id/:client/scope-mappings/clients-by-id/:targetClient', {
realm : '@realm',
- application : '@application',
- targetApp : '@targetApp'
+ client : '@client',
+ targetClient : '@targetClient'
});
});
-module.factory('ApplicationAvailableApplicationScopeMapping', function($resource) {
- return $resource(authUrl + '/admin/realms/:realm/applications-by-id/:application/scope-mappings/applications-by-id/:targetApp/available', {
+module.factory('ClientAvailableClientScopeMapping', function($resource) {
+ return $resource(authUrl + '/admin/realms/:realm/clients-by-id/:client/scope-mappings/clients-by-id/:targetClient/available', {
realm : '@realm',
- application : '@application',
- targetApp : '@targetApp'
+ client : '@client',
+ targetClient : '@targetClient'
});
});
-module.factory('ApplicationCompositeApplicationScopeMapping', function($resource) {
- return $resource(authUrl + '/admin/realms/:realm/applications-by-id/:application/scope-mappings/applications-by-id/:targetApp/composite', {
+module.factory('ClientCompositeClientScopeMapping', function($resource) {
+ return $resource(authUrl + '/admin/realms/:realm/clients-by-id/:client/scope-mappings/clients-by-id/:targetClient/composite', {
realm : '@realm',
- application : '@application',
- targetApp : '@targetApp'
+ client : '@client',
+ targetClient : '@targetClient'
});
});
@@ -420,24 +420,24 @@ module.factory('RealmSessionStats', function($resource) {
});
});
-module.factory('RealmApplicationSessionStats', function($resource) {
- return $resource(authUrl + '/admin/realms/:realm/application-by-id-session-stats', {
+module.factory('RealmClientSessionStats', function($resource) {
+ return $resource(authUrl + '/admin/realms/:realm/client-by-id-session-stats', {
realm : '@realm'
});
});
-module.factory('RoleApplicationComposites', function($resource) {
- return $resource(authUrl + '/admin/realms/:realm/roles-by-id/:role/composites/applications-by-id/:application', {
+module.factory('RoleClientComposites', function($resource) {
+ return $resource(authUrl + '/admin/realms/:realm/roles-by-id/:role/composites/clients-by-id/:client', {
realm : '@realm',
role : '@role',
- application : "@application"
+ client : "@client"
});
});
-function roleControl($scope, realm, role, roles, applications,
- ApplicationRole, RoleById, RoleRealmComposites, RoleApplicationComposites,
+function roleControl($scope, realm, role, roles, clients,
+ ClientRole, RoleById, RoleRealmComposites, RoleClientComposites,
$http, $location, Notifications, Dialog) {
$scope.$watch(function () {
@@ -476,11 +476,11 @@ function roleControl($scope, realm, role, roles, applications,
$scope.selectedRealmRoles = [];
$scope.selectedRealmMappings = [];
$scope.realmMappings = [];
- $scope.applications = applications;
- $scope.applicationRoles = [];
- $scope.selectedApplicationRoles = [];
- $scope.selectedApplicationMappings = [];
- $scope.applicationMappings = [];
+ $scope.clients = clients;
+ $scope.clientRoles = [];
+ $scope.selectedClientRoles = [];
+ $scope.selectedClientMappings = [];
+ $scope.clientMappings = [];
for (var j = 0; j < $scope.realmRoles.length; j++) {
if ($scope.realmRoles[j].id == role.id) {
@@ -540,61 +540,61 @@ function roleControl($scope, realm, role, roles, applications,
});
};
- $scope.addApplicationRole = function() {
+ $scope.addClientRole = function() {
$scope.compositeSwitchDisabled=true;
$http.post(authUrl + '/admin/realms/' + realm.realm + '/roles-by-id/' + role.id + '/composites',
- $scope.selectedApplicationRoles).success(function() {
- for (var i = 0; i < $scope.selectedApplicationRoles.length; i++) {
- var role = $scope.selectedApplicationRoles[i];
- var idx = $scope.applicationRoles.indexOf($scope.selectedApplicationRoles[i]);
+ $scope.selectedClientRoles).success(function() {
+ for (var i = 0; i < $scope.selectedClientRoles.length; i++) {
+ var role = $scope.selectedClientRoles[i];
+ var idx = $scope.clientRoles.indexOf($scope.selectedClientRoles[i]);
if (idx != -1) {
- $scope.applicationRoles.splice(idx, 1);
- $scope.applicationMappings.push(role);
+ $scope.clientRoles.splice(idx, 1);
+ $scope.clientMappings.push(role);
}
}
- $scope.selectedApplicationRoles = [];
+ $scope.selectedClientRoles = [];
});
};
- $scope.deleteApplicationRole = function() {
+ $scope.deleteClientRole = function() {
$scope.compositeSwitchDisabled=true;
$http.delete(authUrl + '/admin/realms/' + realm.realm + '/roles-by-id/' + role.id + '/composites',
- {data : $scope.selectedApplicationMappings, headers : {"content-type" : "application/json"}}).success(function() {
- for (var i = 0; i < $scope.selectedApplicationMappings.length; i++) {
- var role = $scope.selectedApplicationMappings[i];
- var idx = $scope.applicationMappings.indexOf($scope.selectedApplicationMappings[i]);
+ {data : $scope.selectedClientMappings, headers : {"content-type" : "application/json"}}).success(function() {
+ for (var i = 0; i < $scope.selectedClientMappings.length; i++) {
+ var role = $scope.selectedClientMappings[i];
+ var idx = $scope.clientMappings.indexOf($scope.selectedClientMappings[i]);
if (idx != -1) {
- $scope.applicationMappings.splice(idx, 1);
- $scope.applicationRoles.push(role);
+ $scope.clientMappings.splice(idx, 1);
+ $scope.clientRoles.push(role);
}
}
- $scope.selectedApplicationMappings = [];
+ $scope.selectedClientMappings = [];
});
};
- $scope.changeApplication = function() {
- $scope.applicationRoles = ApplicationRole.query({realm : realm.realm, application : $scope.compositeApp.id}, function() {
- $scope.applicationMappings = RoleApplicationComposites.query({realm : realm.realm, role : role.id, application : $scope.compositeApp.id}, function(){
- for (var i = 0; i < $scope.applicationMappings.length; i++) {
- var role = $scope.applicationMappings[i];
- for (var j = 0; j < $scope.applicationRoles.length; j++) {
- var realmRole = $scope.applicationRoles[j];
+ $scope.changeClient = function() {
+ $scope.clientRoles = ClientRole.query({realm : realm.realm, client : $scope.compositeClient.id}, function() {
+ $scope.clientMappings = RoleClientComposites.query({realm : realm.realm, role : role.id, client : $scope.compositeClient.id}, function(){
+ for (var i = 0; i < $scope.clientMappings.length; i++) {
+ var role = $scope.clientMappings[i];
+ for (var j = 0; j < $scope.clientRoles.length; j++) {
+ var realmRole = $scope.clientRoles[j];
if (realmRole.id == role.id) {
- var idx = $scope.applicationRoles.indexOf(realmRole);
+ var idx = $scope.clientRoles.indexOf(realmRole);
if (idx != -1) {
- $scope.applicationRoles.splice(idx, 1);
+ $scope.clientRoles.splice(idx, 1);
break;
}
}
}
}
});
- for (var j = 0; j < $scope.applicationRoles.length; j++) {
- if ($scope.applicationRoles[j] == role.id) {
- var appRole = $scope.applicationRoles[j];
- var idx = $scope.applicationRoles.indexof(appRole);
- $scope.applicationRoles.splice(idx, 1);
+ for (var j = 0; j < $scope.clientRoles.length; j++) {
+ if ($scope.clientRoles[j] == role.id) {
+ var appRole = $scope.clientRoles[j];
+ var idx = $scope.clientRoles.indexof(appRole);
+ $scope.clientRoles.splice(idx, 1);
break;
}
}
@@ -630,10 +630,10 @@ module.factory('RoleById', function($resource) {
});
});
-module.factory('ApplicationRole', function($resource) {
- return $resource(authUrl + '/admin/realms/:realm/applications-by-id/:application/roles/:role', {
+module.factory('ClientRole', function($resource) {
+ return $resource(authUrl + '/admin/realms/:realm/clients-by-id/:client/roles/:role', {
realm : '@realm',
- application : "@application",
+ client : "@client",
role : '@role'
}, {
update : {
@@ -642,10 +642,10 @@ module.factory('ApplicationRole', function($resource) {
});
});
-module.factory('ApplicationClaims', function($resource) {
- return $resource(authUrl + '/admin/realms/:realm/applications-by-id/:application/claims', {
+module.factory('ClientClaims', function($resource) {
+ return $resource(authUrl + '/admin/realms/:realm/clients-by-id/:client/claims', {
realm : '@realm',
- application : "@application"
+ client : "@client"
}, {
update : {
method : 'PUT'
@@ -653,52 +653,52 @@ module.factory('ApplicationClaims', function($resource) {
});
});
-module.factory('ApplicationProtocolMappersByProtocol', function($resource) {
- return $resource(authUrl + '/admin/realms/:realm/applications-by-id/:application/protocol-mappers/protocol/:protocol', {
+module.factory('ClientProtocolMappersByProtocol', function($resource) {
+ return $resource(authUrl + '/admin/realms/:realm/clients-by-id/:client/protocol-mappers/protocol/:protocol', {
realm : '@realm',
- application : "@application",
+ client : "@client",
protocol : "@protocol"
});
});
-module.factory('ApplicationSessionStats', function($resource) {
- return $resource(authUrl + '/admin/realms/:realm/applications-by-id/:application/session-stats', {
+module.factory('ClientSessionStats', function($resource) {
+ return $resource(authUrl + '/admin/realms/:realm/clients-by-id/:client/session-stats', {
realm : '@realm',
- application : "@application"
+ client : "@client"
});
});
-module.factory('ApplicationSessionStatsWithUsers', function($resource) {
- return $resource(authUrl + '/admin/realms/:realm/applications-by-id/:application/session-stats?users=true', {
+module.factory('ClientSessionStatsWithUsers', function($resource) {
+ return $resource(authUrl + '/admin/realms/:realm/clients-by-id/:client/session-stats?users=true', {
realm : '@realm',
- application : "@application"
+ client : "@client"
});
});
-module.factory('ApplicationSessionCount', function($resource) {
- return $resource(authUrl + '/admin/realms/:realm/applications-by-id/:application/session-count', {
+module.factory('ClientSessionCount', function($resource) {
+ return $resource(authUrl + '/admin/realms/:realm/clients-by-id/:client/session-count', {
realm : '@realm',
- application : "@application"
+ client : "@client"
});
});
-module.factory('ApplicationUserSessions', function($resource) {
- return $resource(authUrl + '/admin/realms/:realm/applications-by-id/:application/user-sessions', {
+module.factory('ClientUserSessions', function($resource) {
+ return $resource(authUrl + '/admin/realms/:realm/clients-by-id/:client/user-sessions', {
realm : '@realm',
- application : "@application"
+ client : "@client"
});
});
-module.factory('ApplicationLogoutAll', function($resource) {
- return $resource(authUrl + '/admin/realms/:realm/applications-by-id/:application/logout-all', {
+module.factory('ClientLogoutAll', function($resource) {
+ return $resource(authUrl + '/admin/realms/:realm/clients-by-id/:client/logout-all', {
realm : '@realm',
- application : "@application"
+ client : "@client"
});
});
-module.factory('ApplicationLogoutUser', function($resource) {
- return $resource(authUrl + '/admin/realms/:realm/applications-by-id/:application/logout-user/:user', {
+module.factory('ClientLogoutUser', function($resource) {
+ return $resource(authUrl + '/admin/realms/:realm/clients-by-id/:client/logout-user/:user', {
realm : '@realm',
- application : "@application",
+ client : "@client",
user : "@user"
});
});
@@ -708,39 +708,39 @@ module.factory('RealmLogoutAll', function($resource) {
});
});
-module.factory('ApplicationPushRevocation', function($resource) {
- return $resource(authUrl + '/admin/realms/:realm/applications-by-id/:application/push-revocation', {
+module.factory('ClientPushRevocation', function($resource) {
+ return $resource(authUrl + '/admin/realms/:realm/clients-by-id/:client/push-revocation', {
realm : '@realm',
- application : "@application"
+ client : "@client"
});
});
-module.factory('ApplicationClusterNode', function($resource) {
- return $resource(authUrl + '/admin/realms/:realm/applications-by-id/:application/nodes/:node', {
+module.factory('ClientClusterNode', function($resource) {
+ return $resource(authUrl + '/admin/realms/:realm/clients-by-id/:client/nodes/:node', {
realm : '@realm',
- application : "@application"
+ client : "@client"
});
});
-module.factory('ApplicationTestNodesAvailable', function($resource) {
- return $resource(authUrl + '/admin/realms/:realm/applications-by-id/:application/test-nodes-available', {
+module.factory('ClientTestNodesAvailable', function($resource) {
+ return $resource(authUrl + '/admin/realms/:realm/clients-by-id/:client/test-nodes-available', {
realm : '@realm',
- application : "@application"
+ client : "@client"
});
});
-module.factory('ApplicationCertificate', function($resource) {
- return $resource(authUrl + '/admin/realms/:realm/applications-by-id/:application/certificates/:attribute', {
+module.factory('ClientCertificate', function($resource) {
+ return $resource(authUrl + '/admin/realms/:realm/clients-by-id/:client/certificates/:attribute', {
realm : '@realm',
- application : "@application",
+ client : "@client",
attribute: "@attribute"
});
});
-module.factory('ApplicationCertificateGenerate', function($resource) {
- return $resource(authUrl + '/admin/realms/:realm/applications-by-id/:application/certificates/:attribute/generate', {
+module.factory('ClientCertificateGenerate', function($resource) {
+ return $resource(authUrl + '/admin/realms/:realm/clients-by-id/:client/certificates/:attribute/generate', {
realm : '@realm',
- application : "@application",
+ client : "@client",
attribute: "@attribute"
},
{
@@ -750,10 +750,10 @@ module.factory('ApplicationCertificateGenerate', function($resource) {
});
});
-module.factory('ApplicationCertificateDownload', function($resource) {
- return $resource(authUrl + '/admin/realms/:realm/applications-by-id/:application/certificates/:attribute/download', {
+module.factory('ClientCertificateDownload', function($resource) {
+ return $resource(authUrl + '/admin/realms/:realm/clients-by-id/:client/certificates/:attribute/download', {
realm : '@realm',
- application : "@application",
+ client : "@client",
attribute: "@attribute"
},
{
@@ -764,10 +764,10 @@ module.factory('ApplicationCertificateDownload', function($resource) {
});
});
-module.factory('Application', function($resource) {
- return $resource(authUrl + '/admin/realms/:realm/applications-by-id/:application', {
+module.factory('Client', function($resource) {
+ return $resource(authUrl + '/admin/realms/:realm/clients-by-id/:client', {
realm : '@realm',
- application : '@application'
+ client : '@client'
}, {
update : {
method : 'PUT'
@@ -775,29 +775,29 @@ module.factory('Application', function($resource) {
});
});
-module.factory('ApplicationInstallation', function($resource) {
- var url = authUrl + '/admin/realms/:realm/applications-by-id/:application/installation/json';
+module.factory('ClientInstallation', function($resource) {
+ var url = authUrl + '/admin/realms/:realm/clients-by-id/:client/installation/json';
return {
url : function(parameters)
{
- return url.replace(':realm', parameters.realm).replace(':application', parameters.application);
+ return url.replace(':realm', parameters.realm).replace(':client', parameters.client);
}
}
});
-module.factory('ApplicationInstallationJBoss', function($resource) {
- var url = authUrl + '/admin/realms/:realm/applications-by-id/:application/installation/jboss';
+module.factory('ClientInstallationJBoss', function($resource) {
+ var url = authUrl + '/admin/realms/:realm/clients-by-id/:client/installation/jboss';
return {
url : function(parameters)
{
- return url.replace(':realm', parameters.realm).replace(':application', parameters.application);
+ return url.replace(':realm', parameters.realm).replace(':client', parameters.client);
}
}
});
-module.factory('ApplicationCredentials', function($resource) {
- return $resource(authUrl + '/admin/realms/:realm/applications-by-id/:application/client-secret', {
+module.factory('ClientCredentials', function($resource) {
+ return $resource(authUrl + '/admin/realms/:realm/clients-by-id/:client/client-secret', {
realm : '@realm',
- application : '@application'
+ client : '@client'
}, {
update : {
method : 'POST'
@@ -805,10 +805,10 @@ module.factory('ApplicationCredentials', function($resource) {
});
});
-module.factory('ApplicationOrigins', function($resource) {
- return $resource(authUrl + '/admin/realms/:realm/applications-by-id/:application/allowed-origins', {
+module.factory('ClientOrigins', function($resource) {
+ return $resource(authUrl + '/admin/realms/:realm/clients-by-id/:client/allowed-origins', {
realm : '@realm',
- application : '@application'
+ client : '@client'
}, {
update : {
method : 'PUT',
@@ -822,8 +822,8 @@ module.factory('Current', function(Realm, $route) {
current.realms = {};
current.realm = null;
- current.applications = {};
- current.application = null;
+ current.clients = {};
+ current.client = null;
current.refresh = function() {
current.realm = null;
diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/application-list.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/application-list.html
deleted file mode 100755
index 92bb4af983d..00000000000
--- a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/application-list.html
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
-
{{realm.realm}} Applications
-
-
-
Your search returned no results.
Try modifying the query and try again.
-
-
-
\ No newline at end of file
diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/application-clustering-node.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/client-clustering-node.html
similarity index 79%
rename from forms/common-themes/src/main/resources/theme/base/admin/resources/partials/application-clustering-node.html
rename to forms/common-themes/src/main/resources/theme/base/admin/resources/partials/client-clustering-node.html
index 3c4f6145e18..d959154e169 100644
--- a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/application-clustering-node.html
+++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/client-clustering-node.html
@@ -1,14 +1,14 @@
-
+
- - Applications
- - {{application.name}}
- - Clustering
+ - Clients
+ - {{client.clientId}}
+ - Clustering
- {{node.host}}
-
{{application.name}} Clustering
+
{{client.clientId}} Clustering
Cluster node on host {{node.host}} not registered!