Merge pull request #154 from patriot1burke/master
realm name instead of id
This commit is contained in:
commit
0fe9318fa4
64 changed files with 489 additions and 433 deletions
|
@ -54,7 +54,7 @@ module.controller('ApplicationCredentialsCtrl', function($scope, $location, real
|
|||
}
|
||||
];
|
||||
|
||||
ApplicationCredentials.update({ realm : realm.id, application : application.id }, creds,
|
||||
ApplicationCredentials.update({ realm : realm.realm, application : application.id }, creds,
|
||||
function() {
|
||||
Notifications.success('The password has been changed.');
|
||||
$scope.password = null;
|
||||
|
@ -76,7 +76,7 @@ module.controller('ApplicationCredentialsCtrl', function($scope, $location, real
|
|||
}
|
||||
];
|
||||
|
||||
ApplicationCredentials.update({ realm : realm.id, application : application.id }, creds,
|
||||
ApplicationCredentials.update({ realm : realm.realm, application : application.id }, creds,
|
||||
function() {
|
||||
Notifications.success('The totp was changed.');
|
||||
$scope.totp = null;
|
||||
|
@ -122,7 +122,7 @@ module.controller('ApplicationRoleDetailCtrl', function($scope, realm, applicati
|
|||
$scope.save = function() {
|
||||
if ($scope.create) {
|
||||
ApplicationRole.save({
|
||||
realm: realm.id,
|
||||
realm: realm.realm,
|
||||
application : application.id
|
||||
}, $scope.role, function (data, headers) {
|
||||
$scope.changed = false;
|
||||
|
@ -130,12 +130,12 @@ module.controller('ApplicationRoleDetailCtrl', function($scope, realm, applicati
|
|||
|
||||
var l = headers().location;
|
||||
var id = l.substring(l.lastIndexOf("/") + 1);
|
||||
$location.url("/realms/" + realm.id + "/applications/" + application.id + "/roles/" + id);
|
||||
$location.url("/realms/" + realm.realm + "/applications/" + application.id + "/roles/" + id);
|
||||
Notifications.success("The role has been created.");
|
||||
});
|
||||
} else {
|
||||
ApplicationRole.update({
|
||||
realm : realm.id,
|
||||
realm : realm.realm,
|
||||
application : application.id,
|
||||
roleId : role.id
|
||||
}, $scope.role, function() {
|
||||
|
@ -152,17 +152,17 @@ module.controller('ApplicationRoleDetailCtrl', function($scope, realm, applicati
|
|||
};
|
||||
|
||||
$scope.cancel = function() {
|
||||
$location.url("/realms/" + realm.id + "/applications/" + application.id + "/roles");
|
||||
$location.url("/realms/" + realm.realm + "/applications/" + application.id + "/roles");
|
||||
};
|
||||
|
||||
$scope.remove = function() {
|
||||
Dialog.confirmDelete($scope.role.name, 'role', function() {
|
||||
$scope.role.$remove({
|
||||
realm : realm.id,
|
||||
realm : realm.realm,
|
||||
application : application.id,
|
||||
roleId : $scope.role.id
|
||||
}, function() {
|
||||
$location.url("/realms/" + realm.id + "/applications/" + application.id + "/roles");
|
||||
$location.url("/realms/" + realm.realm + "/applications/" + application.id + "/roles");
|
||||
Notifications.success("The role has been deleted.");
|
||||
});
|
||||
});
|
||||
|
@ -233,17 +233,17 @@ module.controller('ApplicationDetailCtrl', function($scope, realm, application,
|
|||
$scope.save = function() {
|
||||
if ($scope.create) {
|
||||
Application.save({
|
||||
realm: realm.id
|
||||
realm: realm.realm
|
||||
}, $scope.application, function (data, headers) {
|
||||
$scope.changed = false;
|
||||
var l = headers().location;
|
||||
var id = l.substring(l.lastIndexOf("/") + 1);
|
||||
$location.url("/realms/" + realm.id + "/applications/" + id);
|
||||
$location.url("/realms/" + realm.realm + "/applications/" + id);
|
||||
Notifications.success("The application has been created.");
|
||||
});
|
||||
} else {
|
||||
Application.update({
|
||||
realm : realm.id,
|
||||
realm : realm.realm,
|
||||
id : application.id
|
||||
}, $scope.application, function() {
|
||||
$scope.changed = false;
|
||||
|
@ -259,16 +259,16 @@ module.controller('ApplicationDetailCtrl', function($scope, realm, application,
|
|||
};
|
||||
|
||||
$scope.cancel = function() {
|
||||
$location.url("/realms/" + realm.id + "/applications");
|
||||
$location.url("/realms/" + realm.realm + "/applications");
|
||||
};
|
||||
|
||||
$scope.remove = function() {
|
||||
Dialog.confirmDelete($scope.application.name, 'application', function() {
|
||||
$scope.application.$remove({
|
||||
realm : realm.id,
|
||||
realm : realm.realm,
|
||||
id : $scope.application.id
|
||||
}, function() {
|
||||
$location.url("/realms/" + realm.id + "/applications");
|
||||
$location.url("/realms/" + realm.realm + "/applications");
|
||||
Notifications.success("The application has been deleted.");
|
||||
});
|
||||
});
|
||||
|
@ -292,7 +292,7 @@ module.controller('ApplicationScopeMappingCtrl', function($scope, $http, realm,
|
|||
|
||||
|
||||
|
||||
$scope.realmMappings = ApplicationRealmScopeMapping.query({realm : realm.id, application : application.id}, function(){
|
||||
$scope.realmMappings = ApplicationRealmScopeMapping.query({realm : realm.realm, application : application.id}, function(){
|
||||
for (var i = 0; i < $scope.realmMappings.length; i++) {
|
||||
var role = $scope.realmMappings[i];
|
||||
for (var j = 0; j < $scope.realmRoles.length; j++) {
|
||||
|
@ -309,7 +309,7 @@ module.controller('ApplicationScopeMappingCtrl', function($scope, $http, realm,
|
|||
});
|
||||
|
||||
$scope.addRealmRole = function() {
|
||||
$http.post('/auth/rest/admin/realms/' + realm.id + '/applications/' + application.id + '/scope-mappings/realm',
|
||||
$http.post('/auth/rest/admin/realms/' + realm.realm + '/applications/' + application.id + '/scope-mappings/realm',
|
||||
$scope.selectedRealmRoles).success(function() {
|
||||
for (var i = 0; i < $scope.selectedRealmRoles.length; i++) {
|
||||
var role = $scope.selectedRealmRoles[i];
|
||||
|
@ -324,7 +324,7 @@ module.controller('ApplicationScopeMappingCtrl', function($scope, $http, realm,
|
|||
};
|
||||
|
||||
$scope.deleteRealmRole = function() {
|
||||
$http.delete('/auth/rest/admin/realms/' + realm.id + '/applications/' + application.id + '/scope-mappings/realm',
|
||||
$http.delete('/auth/rest/admin/realms/' + realm.realm + '/applications/' + application.id + '/scope-mappings/realm',
|
||||
{data : $scope.selectedRealmMappings, headers : {"content-type" : "application/json"}}).success(function() {
|
||||
for (var i = 0; i < $scope.selectedRealmMappings.length; i++) {
|
||||
var role = $scope.selectedRealmMappings[i];
|
||||
|
@ -339,7 +339,7 @@ module.controller('ApplicationScopeMappingCtrl', function($scope, $http, realm,
|
|||
};
|
||||
|
||||
$scope.addApplicationRole = function() {
|
||||
$http.post('/auth/rest/admin/realms/' + realm.id + '/applications/' + application.id + '/scope-mappings/applications/' + $scope.targetApp.id,
|
||||
$http.post('/auth/rest/admin/realms/' + realm.realm + '/applications/' + application.id + '/scope-mappings/applications/' + $scope.targetApp.id,
|
||||
$scope.selectedApplicationRoles).success(function() {
|
||||
for (var i = 0; i < $scope.selectedApplicationRoles.length; i++) {
|
||||
var role = $scope.selectedApplicationRoles[i];
|
||||
|
@ -354,7 +354,7 @@ module.controller('ApplicationScopeMappingCtrl', function($scope, $http, realm,
|
|||
};
|
||||
|
||||
$scope.deleteApplicationRole = function() {
|
||||
$http.delete('/auth/rest/admin/realms/' + realm.id + '/applications/' + application.id + '/scope-mappings/applications/' + $scope.targetApp.id,
|
||||
$http.delete('/auth/rest/admin/realms/' + realm.realm + '/applications/' + application.id + '/scope-mappings/applications/' + $scope.targetApp.id,
|
||||
{data : $scope.selectedApplicationMappings, headers : {"content-type" : "application/json"}}).success(function() {
|
||||
for (var i = 0; i < $scope.selectedApplicationMappings.length; i++) {
|
||||
var role = $scope.selectedApplicationMappings[i];
|
||||
|
@ -370,8 +370,8 @@ module.controller('ApplicationScopeMappingCtrl', function($scope, $http, realm,
|
|||
|
||||
|
||||
$scope.changeApplication = function() {
|
||||
$scope.applicationRoles = ApplicationRole.query({realm : realm.id, application : $scope.targetApp.id}, function() {
|
||||
$scope.applicationMappings = ApplicationApplicationScopeMapping.query({realm : realm.id, application : application.id, targetApp : $scope.targetApp.id}, function(){
|
||||
$scope.applicationRoles = ApplicationRole.query({realm : realm.realm, application : $scope.targetApp.id}, function() {
|
||||
$scope.applicationMappings = ApplicationApplicationScopeMapping.query({realm : realm.realm, application : application.id, targetApp : $scope.targetApp.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++) {
|
||||
|
|
|
@ -42,7 +42,7 @@ module.controller('OAuthClientCredentialsCtrl', function($scope, $location, real
|
|||
}
|
||||
];
|
||||
|
||||
OAuthClientCredentials.update({ realm : realm.id, oauth : oauth.id }, creds,
|
||||
OAuthClientCredentials.update({ realm : realm.realm, oauth : oauth.id }, creds,
|
||||
function() {
|
||||
Notifications.success('The password has been changed.');
|
||||
$scope.password = null;
|
||||
|
@ -64,7 +64,7 @@ module.controller('OAuthClientCredentialsCtrl', function($scope, $location, real
|
|||
}
|
||||
];
|
||||
|
||||
OAuthClientCredentials.update({ realm : realm.id, oauth : oauth.id }, creds,
|
||||
OAuthClientCredentials.update({ realm : realm.realm, oauth : oauth.id }, creds,
|
||||
function() {
|
||||
Notifications.success('The totp was changed.');
|
||||
$scope.totp = null;
|
||||
|
@ -133,17 +133,17 @@ module.controller('OAuthClientDetailCtrl', function($scope, realm, oauth, OAuthC
|
|||
$scope.save = function() {
|
||||
if ($scope.create) {
|
||||
OAuthClient.save({
|
||||
realm: realm.id
|
||||
realm: realm.realm
|
||||
}, $scope.oauth, function (data, headers) {
|
||||
$scope.changed = false;
|
||||
var l = headers().location;
|
||||
var id = l.substring(l.lastIndexOf("/") + 1);
|
||||
$location.url("/realms/" + realm.id + "/oauth-clients/" + id);
|
||||
$location.url("/realms/" + realm.realm + "/oauth-clients/" + id);
|
||||
Notifications.success("The oauth client has been created.");
|
||||
});
|
||||
} else {
|
||||
OAuthClient.update({
|
||||
realm : realm.id,
|
||||
realm : realm.realm,
|
||||
id : oauth.id
|
||||
}, $scope.oauth, function() {
|
||||
$scope.changed = false;
|
||||
|
@ -159,16 +159,16 @@ module.controller('OAuthClientDetailCtrl', function($scope, realm, oauth, OAuthC
|
|||
};
|
||||
|
||||
$scope.cancel = function() {
|
||||
$location.url("/realms/" + realm.id + "/oauth-clients");
|
||||
$location.url("/realms/" + realm.realm + "/oauth-clients");
|
||||
};
|
||||
|
||||
$scope.remove = function() {
|
||||
Dialog.confirmDelete($scope.oauth.name, 'oauth', function() {
|
||||
$scope.oauth.$remove({
|
||||
realm : realm.id,
|
||||
realm : realm.realm,
|
||||
id : $scope.oauth.id
|
||||
}, function() {
|
||||
$location.url("/realms/" + realm.id + "/oauth-clients");
|
||||
$location.url("/realms/" + realm.realm + "/oauth-clients");
|
||||
Notifications.success("The oauth client has been deleted.");
|
||||
});
|
||||
});
|
||||
|
@ -192,7 +192,7 @@ module.controller('OAuthClientScopeMappingCtrl', function($scope, $http, realm,
|
|||
|
||||
|
||||
|
||||
$scope.realmMappings = OAuthClientRealmScopeMapping.query({realm : realm.id, oauth : oauth.id}, function(){
|
||||
$scope.realmMappings = OAuthClientRealmScopeMapping.query({realm : realm.realm, oauth : oauth.id}, function(){
|
||||
for (var i = 0; i < $scope.realmMappings.length; i++) {
|
||||
var role = $scope.realmMappings[i];
|
||||
for (var j = 0; j < $scope.realmRoles.length; j++) {
|
||||
|
@ -209,7 +209,7 @@ module.controller('OAuthClientScopeMappingCtrl', function($scope, $http, realm,
|
|||
});
|
||||
|
||||
$scope.addRealmRole = function() {
|
||||
$http.post('/auth/rest/admin/realms/' + realm.id + '/oauth-clients/' + oauth.id + '/scope-mappings/realm',
|
||||
$http.post('/auth/rest/admin/realms/' + realm.realm + '/oauth-clients/' + oauth.id + '/scope-mappings/realm',
|
||||
$scope.selectedRealmRoles).success(function() {
|
||||
for (var i = 0; i < $scope.selectedRealmRoles.length; i++) {
|
||||
var role = $scope.selectedRealmRoles[i];
|
||||
|
@ -224,7 +224,7 @@ module.controller('OAuthClientScopeMappingCtrl', function($scope, $http, realm,
|
|||
};
|
||||
|
||||
$scope.deleteRealmRole = function() {
|
||||
$http.delete('/auth/rest/admin/realms/' + realm.id + '/oauth-clients/' + oauth.id + '/scope-mappings/realm',
|
||||
$http.delete('/auth/rest/admin/realms/' + realm.realm + '/oauth-clients/' + oauth.id + '/scope-mappings/realm',
|
||||
{data : $scope.selectedRealmMappings, headers : {"content-type" : "application/json"}}).success(function() {
|
||||
for (var i = 0; i < $scope.selectedRealmMappings.length; i++) {
|
||||
var role = $scope.selectedRealmMappings[i];
|
||||
|
@ -239,7 +239,7 @@ module.controller('OAuthClientScopeMappingCtrl', function($scope, $http, realm,
|
|||
};
|
||||
|
||||
$scope.addApplicationRole = function() {
|
||||
$http.post('/auth/rest/admin/realms/' + realm.id + '/oauth-clients/' + oauth.id + '/scope-mappings/applications/' + $scope.targetApp.id,
|
||||
$http.post('/auth/rest/admin/realms/' + realm.realm + '/oauth-clients/' + oauth.id + '/scope-mappings/applications/' + $scope.targetApp.id,
|
||||
$scope.selectedApplicationRoles).success(function() {
|
||||
for (var i = 0; i < $scope.selectedApplicationRoles.length; i++) {
|
||||
var role = $scope.selectedApplicationRoles[i];
|
||||
|
@ -254,7 +254,7 @@ module.controller('OAuthClientScopeMappingCtrl', function($scope, $http, realm,
|
|||
};
|
||||
|
||||
$scope.deleteApplicationRole = function() {
|
||||
$http.delete('/auth/rest/admin/realms/' + realm.id + '/oauth-clients/' + oauth.id + '/scope-mappings/applications/' + $scope.targetApp.id,
|
||||
$http.delete('/auth/rest/admin/realms/' + realm.realm + '/oauth-clients/' + oauth.id + '/scope-mappings/applications/' + $scope.targetApp.id,
|
||||
{data : $scope.selectedApplicationMappings, headers : {"content-type" : "application/json"}}).success(function() {
|
||||
for (var i = 0; i < $scope.selectedApplicationMappings.length; i++) {
|
||||
var role = $scope.selectedApplicationMappings[i];
|
||||
|
@ -270,8 +270,8 @@ module.controller('OAuthClientScopeMappingCtrl', function($scope, $http, realm,
|
|||
|
||||
|
||||
$scope.changeApplication = function() {
|
||||
$scope.applicationRoles = ApplicationRole.query({realm : realm.id, application : $scope.targetApp.id}, function() {
|
||||
$scope.applicationMappings = OAuthClientApplicationScopeMapping.query({realm : realm.id, oauth : oauth.id, targetApp : $scope.targetApp.id}, function(){
|
||||
$scope.applicationRoles = ApplicationRole.query({realm : realm.realm, application : $scope.targetApp.id}, function() {
|
||||
$scope.applicationMappings = OAuthClientApplicationScopeMapping.query({realm : realm.realm, oauth : oauth.id, targetApp : $scope.targetApp.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++) {
|
||||
|
|
|
@ -24,15 +24,15 @@ module.controller('HomeCtrl', function(Realm, $location) {
|
|||
Realm.query(null, function(realms) {
|
||||
var realm;
|
||||
if (realms.length == 1) {
|
||||
realm = realms[0].id;
|
||||
realm = realms[0].realm;
|
||||
} else if (realms.length == 2) {
|
||||
if (realms[0].realm == 'Keycloak Administration') {
|
||||
realm = realms[1].id;
|
||||
realm = realms[1].realm;
|
||||
} else if (realms[1].realm == 'Keycloak Administration') {
|
||||
realm = realms[0].id;
|
||||
realm = realms[0].realm;
|
||||
}
|
||||
}
|
||||
|
||||
console.log("****** HomeCtrl ******");
|
||||
if (realm) {
|
||||
$location.url('/realms/' + realm);
|
||||
} else {
|
||||
|
@ -50,7 +50,7 @@ module.controller('RealmDropdownCtrl', function($scope, Realm, Current, Auth, $l
|
|||
// Current.realms = Realm.get();
|
||||
$scope.current = Current;
|
||||
$scope.changeRealm = function() {
|
||||
$location.url("/realms/" + $scope.current.realm.id);
|
||||
$location.url("/realms/" + $scope.current.realm.realm);
|
||||
};
|
||||
$scope.showNav = function() {
|
||||
var show = Current.realms.length > 0;
|
||||
|
@ -118,18 +118,16 @@ module.controller('RealmCreateCtrl', function($scope, Current, Realm, $upload, $
|
|||
|
||||
$scope.save = function() {
|
||||
var realmCopy = angular.copy($scope.realm);
|
||||
Realm.save(realmCopy, function(data, headers) {
|
||||
console.log('creating new realm');
|
||||
var l = headers().location;
|
||||
var id = l.substring(l.lastIndexOf("/") + 1);
|
||||
console.log('creating new realm **');
|
||||
Realm.create(realmCopy, function(data, headers) {
|
||||
var data = Realm.query(function() {
|
||||
Current.realms = data;
|
||||
for (var i = 0; i < Current.realms.length; i++) {
|
||||
if (Current.realms[i].id == id) {
|
||||
if (Current.realms[i].realm == realmCopy.realm) {
|
||||
Current.realm = Current.realms[i];
|
||||
}
|
||||
}
|
||||
$location.url("/realms/" + id);
|
||||
$location.url("/realms/" + realmCopy.realm);
|
||||
Notifications.success("The realm has been created.");
|
||||
});
|
||||
});
|
||||
|
@ -143,7 +141,7 @@ module.controller('RealmCreateCtrl', function($scope, Current, Realm, $upload, $
|
|||
|
||||
|
||||
module.controller('RealmDetailCtrl', function($scope, Current, Realm, realm, $http, $location, Dialog, Notifications) {
|
||||
$scope.createRealm = !realm.id;
|
||||
$scope.createRealm = !realm.realm;
|
||||
|
||||
console.log('RealmDetailCtrl');
|
||||
|
||||
|
@ -154,19 +152,28 @@ module.controller('RealmDetailCtrl', function($scope, Current, Realm, realm, $ht
|
|||
cookieLoginAllowed: true
|
||||
};
|
||||
} else {
|
||||
if (Current.realm == null || Current.realm.id != realm.id) {
|
||||
if (Current.realm == null || Current.realm.realm != realm.realm) {
|
||||
for (var i = 0; i < Current.realms.length; i++) {
|
||||
if (realm.id == Current.realms[i].id) {
|
||||
if (realm.realm == Current.realms[i].realm) {
|
||||
Current.realm = Current.realms[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Current.realm == null || Current.realm.id != realm.id) {
|
||||
console.log('realm name: ' + realm.realm);
|
||||
for (var i = 0; i < Current.realms.length; i++) {
|
||||
console.log('checking Current.realm:' + Current.realms[i].realm);
|
||||
if (Current.realms[i].realm == realm.realm) {
|
||||
Current.realm = Current.realms[i];
|
||||
}
|
||||
}
|
||||
/*
|
||||
if (Current.realm == null || Current.realm.realm != realm.realm) {
|
||||
console.log('should be unreachable');
|
||||
console.log('Why? ' + Current.realms.length + ' ' + Current.realm);
|
||||
return;
|
||||
}
|
||||
*/
|
||||
$scope.realm = angular.copy(realm);
|
||||
$scope.realm.requireSsl = !realm.sslNotRequired;
|
||||
}
|
||||
|
@ -193,16 +200,14 @@ module.controller('RealmDetailCtrl', function($scope, Current, Realm, realm, $ht
|
|||
if ($scope.createRealm) {
|
||||
Realm.save(realmCopy, function(data, headers) {
|
||||
console.log('creating new realm');
|
||||
var l = headers().location;
|
||||
var id = l.substring(l.lastIndexOf("/") + 1);
|
||||
var data = Realm.query(function() {
|
||||
Current.realms = data;
|
||||
for (var i = 0; i < Current.realms.length; i++) {
|
||||
if (Current.realms[i].id == id) {
|
||||
if (Current.realms[i].realm == realmCopy.realm) {
|
||||
Current.realm = Current.realms[i];
|
||||
}
|
||||
}
|
||||
$location.url("/realms/" + id);
|
||||
$location.url("/realms/" + realmCopy.realm);
|
||||
Notifications.success("The realm has been created.");
|
||||
$scope.social = $scope.realm.social;
|
||||
$scope.registrationAllowed = $scope.realm.registrationAllowed;
|
||||
|
@ -211,18 +216,18 @@ module.controller('RealmDetailCtrl', function($scope, Current, Realm, realm, $ht
|
|||
} else {
|
||||
console.log('updating realm...');
|
||||
$scope.changed = false;
|
||||
Realm.update(realmCopy, function () {
|
||||
var id = realmCopy.id;
|
||||
console.log('oldCopy.realm - ' + oldCopy.realm);
|
||||
Realm.update({ id : oldCopy.realm}, realmCopy, function () {
|
||||
var data = Realm.query(function () {
|
||||
Current.realms = data;
|
||||
for (var i = 0; i < Current.realms.length; i++) {
|
||||
if (Current.realms[i].id == id) {
|
||||
if (Current.realms[i].realm == realmCopy.realm) {
|
||||
Current.realm = Current.realms[i];
|
||||
oldCopy = angular.copy($scope.realm);
|
||||
}
|
||||
}
|
||||
});
|
||||
$location.url("/realms/" + id);
|
||||
$location.url("/realms/" + realmCopy.realm);
|
||||
Notifications.success("Your changes have been saved to the realm.");
|
||||
$scope.social = $scope.realm.social;
|
||||
$scope.registrationAllowed = $scope.realm.registrationAllowed;
|
||||
|
@ -242,7 +247,7 @@ module.controller('RealmDetailCtrl', function($scope, Current, Realm, realm, $ht
|
|||
|
||||
$scope.remove = function() {
|
||||
Dialog.confirmDelete($scope.realm.realm, 'realm', function() {
|
||||
Realm.remove({ id : $scope.realm.id }, function() {
|
||||
Realm.remove({ id : $scope.realm.realm }, function() {
|
||||
Current.realms = Realm.query();
|
||||
Notifications.success("The realm has been deleted.");
|
||||
$location.url("/");
|
||||
|
@ -255,7 +260,7 @@ module.controller('RealmRequiredCredentialsCtrl', function($scope, Realm, realm,
|
|||
console.log('RealmRequiredCredentialsCtrl');
|
||||
|
||||
$scope.realm = {
|
||||
id : realm.id, realm : realm.realm, social : realm.social,
|
||||
id : realm.realm, realm : realm.realm, social : realm.social,
|
||||
requiredCredentials : realm.requiredCredentials,
|
||||
requiredApplicationCredentials : realm.requiredApplicationCredentials,
|
||||
requiredOAuthClientCredentials : realm.requiredOAuthClientCredentials,
|
||||
|
@ -406,7 +411,7 @@ module.controller('RealmRequiredCredentialsCtrl', function($scope, Realm, realm,
|
|||
$scope.changed = false;
|
||||
|
||||
Realm.update($scope.realm, function () {
|
||||
$location.url("/realms/" + realm.id + "/required-credentials");
|
||||
$location.url("/realms/" + realm.realm + "/required-credentials");
|
||||
Notifications.success("Your changes have been saved to the realm.");
|
||||
oldCopy = angular.copy($scope.realm);
|
||||
});
|
||||
|
@ -498,7 +503,7 @@ module.controller('RealmRegistrationCtrl', function ($scope, Realm, realm, appli
|
|||
$scope.selectedAppDefRoles = [];
|
||||
|
||||
// Populate available roles for selected application
|
||||
var appDefaultRoles = ApplicationRole.query({realm: $scope.realm.id, application: $scope.application.id}, function () {
|
||||
var appDefaultRoles = ApplicationRole.query({realm: $scope.realm.realm, application: $scope.application.id}, function () {
|
||||
|
||||
if (!$scope.application.hasOwnProperty('defaultRoles') || $scope.application.defaultRoles === null) {
|
||||
$scope.application.defaultRoles = [];
|
||||
|
@ -535,7 +540,7 @@ module.controller('RealmRegistrationCtrl', function ($scope, Realm, realm, appli
|
|||
|
||||
// Update/save the selected application with new default roles.
|
||||
Application.update({
|
||||
realm: $scope.realm.id,
|
||||
realm: $scope.realm.realm,
|
||||
id: $scope.application.id
|
||||
}, $scope.application, function () {
|
||||
Notifications.success("Your changes have been saved to the application.");
|
||||
|
@ -559,7 +564,7 @@ module.controller('RealmRegistrationCtrl', function ($scope, Realm, realm, appli
|
|||
|
||||
// Update/save the selected application with new default roles.
|
||||
Application.update({
|
||||
realm: $scope.realm.id,
|
||||
realm: $scope.realm.realm,
|
||||
id: $scope.application.id
|
||||
}, $scope.application, function () {
|
||||
Notifications.success("Your changes have been saved to the application.");
|
||||
|
@ -672,7 +677,7 @@ module.controller('RealmSocialCtrl', function($scope, realm, Realm, $location, N
|
|||
realmCopy.social = true;
|
||||
$scope.changed = false;
|
||||
Realm.update(realmCopy, function () {
|
||||
$location.url("/realms/" + realm.id + "/social-settings");
|
||||
$location.url("/realms/" + realm.realm + "/social-settings");
|
||||
Notifications.success("Saved changes to realm");
|
||||
oldCopy = realmCopy;
|
||||
});
|
||||
|
@ -741,7 +746,7 @@ module.controller('RealmTokenDetailCtrl', function($scope, Realm, realm, $http,
|
|||
|
||||
$scope.changed = false;
|
||||
Realm.update(realmCopy, function () {
|
||||
$location.url("/realms/" + realm.id + "/token-settings");
|
||||
$location.url("/realms/" + realm.realm + "/token-settings");
|
||||
Notifications.success("Your changes have been saved to the realm.");
|
||||
});
|
||||
};
|
||||
|
@ -757,9 +762,9 @@ module.controller('RealmKeysDetailCtrl', function($scope, Realm, realm, $http, $
|
|||
|
||||
$scope.generate = function() {
|
||||
Dialog.confirmGenerateKeys($scope.realm.realm, 'realm', function() {
|
||||
Realm.update({ id: realm.id, publicKey : 'GENERATE' }, function () {
|
||||
Realm.update({ id: realm.realm, publicKey : 'GENERATE' }, function () {
|
||||
Notifications.success('New keys generated for realm.');
|
||||
Realm.get({ id : realm.id }, function(updated) {
|
||||
Realm.get({ id : realm.realm }, function(updated) {
|
||||
$scope.realm = updated;
|
||||
})
|
||||
});
|
||||
|
@ -801,19 +806,19 @@ module.controller('RoleDetailCtrl', function($scope, realm, role, Role, $locatio
|
|||
$scope.save = function() {
|
||||
if ($scope.create) {
|
||||
Role.save({
|
||||
realm: realm.id
|
||||
realm: realm.realm
|
||||
}, $scope.role, function (data, headers) {
|
||||
$scope.changed = false;
|
||||
role = angular.copy($scope.role);
|
||||
|
||||
var l = headers().location;
|
||||
var id = l.substring(l.lastIndexOf("/") + 1);
|
||||
$location.url("/realms/" + realm.id + "/roles/" + id);
|
||||
$location.url("/realms/" + realm.realm + "/roles/" + id);
|
||||
Notifications.success("The role has been created.");
|
||||
});
|
||||
} else {
|
||||
Role.update({
|
||||
realm : realm.id,
|
||||
realm : realm.realm,
|
||||
roleId : role.id
|
||||
}, $scope.role, function() {
|
||||
$scope.changed = false;
|
||||
|
@ -829,16 +834,16 @@ module.controller('RoleDetailCtrl', function($scope, realm, role, Role, $locatio
|
|||
};
|
||||
|
||||
$scope.cancel = function() {
|
||||
$location.url("/realms/" + realm.id + "/roles");
|
||||
$location.url("/realms/" + realm.realm + "/roles");
|
||||
};
|
||||
|
||||
$scope.remove = function() {
|
||||
Dialog.confirmDelete($scope.role.name, 'role', function() {
|
||||
$scope.role.$remove({
|
||||
realm : realm.id,
|
||||
realm : realm.realm,
|
||||
roleId : $scope.role.id
|
||||
}, function() {
|
||||
$location.url("/realms/" + realm.id + "/roles");
|
||||
$location.url("/realms/" + realm.realm + "/roles");
|
||||
Notifications.success("The role has been deleted.");
|
||||
});
|
||||
});
|
||||
|
@ -869,7 +874,7 @@ module.controller('RealmSMTPSettingsCtrl', function($scope, Current, Realm, real
|
|||
realmCopy['smtpServer'] = detypeObject(realmCopy.smtpServer);
|
||||
$scope.changed = false;
|
||||
Realm.update(realmCopy, function () {
|
||||
$location.url("/realms/" + realm.id + "/smtp-settings");
|
||||
$location.url("/realms/" + realm.realm + "/smtp-settings");
|
||||
Notifications.success("Your changes have been saved to the realm.");
|
||||
});
|
||||
};
|
||||
|
|
|
@ -13,7 +13,7 @@ module.controller('UserRoleMappingCtrl', function($scope, $http, realm, user, ro
|
|||
|
||||
|
||||
|
||||
$scope.realmMappings = RealmRoleMapping.query({realm : realm.id, userId : user.username}, function(){
|
||||
$scope.realmMappings = RealmRoleMapping.query({realm : realm.realm, userId : user.username}, function(){
|
||||
for (var i = 0; i < $scope.realmMappings.length; i++) {
|
||||
var role = $scope.realmMappings[i];
|
||||
for (var j = 0; j < $scope.realmRoles.length; j++) {
|
||||
|
@ -30,7 +30,7 @@ module.controller('UserRoleMappingCtrl', function($scope, $http, realm, user, ro
|
|||
});
|
||||
|
||||
$scope.addRealmRole = function() {
|
||||
$http.post('/auth/rest/admin/realms/' + realm.id + '/users/' + user.username + '/role-mappings/realm',
|
||||
$http.post('/auth/rest/admin/realms/' + realm.realm + '/users/' + user.username + '/role-mappings/realm',
|
||||
$scope.selectedRealmRoles).success(function() {
|
||||
for (var i = 0; i < $scope.selectedRealmRoles.length; i++) {
|
||||
var role = $scope.selectedRealmRoles[i];
|
||||
|
@ -45,7 +45,7 @@ module.controller('UserRoleMappingCtrl', function($scope, $http, realm, user, ro
|
|||
};
|
||||
|
||||
$scope.deleteRealmRole = function() {
|
||||
$http.delete('/auth/rest/admin/realms/' + realm.id + '/users/' + user.username + '/role-mappings/realm',
|
||||
$http.delete('/auth/rest/admin/realms/' + realm.realm + '/users/' + user.username + '/role-mappings/realm',
|
||||
{data : $scope.selectedRealmMappings, headers : {"content-type" : "application/json"}}).success(function() {
|
||||
for (var i = 0; i < $scope.selectedRealmMappings.length; i++) {
|
||||
var role = $scope.selectedRealmMappings[i];
|
||||
|
@ -60,7 +60,7 @@ module.controller('UserRoleMappingCtrl', function($scope, $http, realm, user, ro
|
|||
};
|
||||
|
||||
$scope.addApplicationRole = function() {
|
||||
$http.post('/auth/rest/admin/realms/' + realm.id + '/users/' + user.username + '/role-mappings/applications/' + $scope.application.id,
|
||||
$http.post('/auth/rest/admin/realms/' + realm.realm + '/users/' + user.username + '/role-mappings/applications/' + $scope.application.id,
|
||||
$scope.selectedApplicationRoles).success(function() {
|
||||
for (var i = 0; i < $scope.selectedApplicationRoles.length; i++) {
|
||||
var role = $scope.selectedApplicationRoles[i];
|
||||
|
@ -75,7 +75,7 @@ module.controller('UserRoleMappingCtrl', function($scope, $http, realm, user, ro
|
|||
};
|
||||
|
||||
$scope.deleteApplicationRole = function() {
|
||||
$http.delete('/auth/rest/admin/realms/' + realm.id + '/users/' + user.username + '/role-mappings/applications/' + $scope.application.id,
|
||||
$http.delete('/auth/rest/admin/realms/' + realm.realm + '/users/' + user.username + '/role-mappings/applications/' + $scope.application.id,
|
||||
{data : $scope.selectedApplicationMappings, headers : {"content-type" : "application/json"}}).success(function() {
|
||||
for (var i = 0; i < $scope.selectedApplicationMappings.length; i++) {
|
||||
var role = $scope.selectedApplicationMappings[i];
|
||||
|
@ -91,8 +91,8 @@ module.controller('UserRoleMappingCtrl', function($scope, $http, realm, user, ro
|
|||
|
||||
|
||||
$scope.changeApplication = function() {
|
||||
$scope.applicationRoles = ApplicationRole.query({realm : realm.id, userId : user.username, application : $scope.application.id}, function() {
|
||||
$scope.applicationMappings = ApplicationRoleMapping.query({realm : realm.id, userId : user.username, application : $scope.application.id}, function(){
|
||||
$scope.applicationRoles = ApplicationRole.query({realm : realm.realm, userId : user.username, application : $scope.application.id}, function() {
|
||||
$scope.applicationMappings = ApplicationRoleMapping.query({realm : realm.realm, userId : user.username, application : $scope.application.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++) {
|
||||
|
@ -122,7 +122,7 @@ module.controller('UserListCtrl', function($scope, realm, User) {
|
|||
$scope.searchLoaded = false;
|
||||
$scope.currentSearch = $scope.search;
|
||||
|
||||
var params = { realm: realm.id };
|
||||
var params = { realm: realm.realm };
|
||||
if ($scope.search) {
|
||||
params.search = $scope.search;
|
||||
}
|
||||
|
@ -185,17 +185,17 @@ module.controller('UserDetailCtrl', function($scope, realm, user, User, $locatio
|
|||
$scope.save = function() {
|
||||
if ($scope.create) {
|
||||
User.save({
|
||||
realm: realm.id
|
||||
realm: realm.realm
|
||||
}, $scope.user, function () {
|
||||
$scope.changed = false;
|
||||
user = angular.copy($scope.user);
|
||||
|
||||
$location.url("/realms/" + realm.id + "/users/" + $scope.user.username);
|
||||
$location.url("/realms/" + realm.realm + "/users/" + $scope.user.username);
|
||||
Notifications.success("The user has been created.");
|
||||
});
|
||||
} else {
|
||||
User.update({
|
||||
realm: realm.id,
|
||||
realm: realm.realm,
|
||||
userId: $scope.user.username
|
||||
}, $scope.user, function () {
|
||||
$scope.changed = false;
|
||||
|
@ -211,16 +211,16 @@ module.controller('UserDetailCtrl', function($scope, realm, user, User, $locatio
|
|||
};
|
||||
|
||||
$scope.cancel = function() {
|
||||
$location.url("/realms/" + realm.id + "/users");
|
||||
$location.url("/realms/" + realm.realm + "/users");
|
||||
};
|
||||
|
||||
$scope.remove = function() {
|
||||
Dialog.confirmDelete($scope.user.username, 'user', function() {
|
||||
$scope.user.$remove({
|
||||
realm : realm.id,
|
||||
realm : realm.realm,
|
||||
userId : $scope.user.username
|
||||
}, function() {
|
||||
$location.url("/realms/" + realm.id + "/users");
|
||||
$location.url("/realms/" + realm.realm + "/users");
|
||||
Notifications.success("The user has been deleted.");
|
||||
});
|
||||
});
|
||||
|
@ -259,7 +259,7 @@ module.controller('UserCredentialsCtrl', function($scope, realm, user, User, Use
|
|||
var credentials = [ { type : "password", value : $scope.password } ];
|
||||
|
||||
User.update({
|
||||
realm: realm.id,
|
||||
realm: realm.realm,
|
||||
userId: $scope.user.username
|
||||
}, $scope.user, function () {
|
||||
|
||||
|
@ -267,7 +267,7 @@ module.controller('UserCredentialsCtrl', function($scope, realm, user, User, Use
|
|||
|
||||
if ($scope.pwdChange){
|
||||
UserCredentials.update({
|
||||
realm: realm.id,
|
||||
realm: realm.realm,
|
||||
userId: $scope.user.username
|
||||
}, credentials, function () {
|
||||
Notifications.success("The password has been reset. The user is required to change his password on" +
|
||||
|
@ -326,7 +326,7 @@ module.controller('UserCredentialsCtrl', function($scope, realm, user, User, Use
|
|||
|
||||
module.controller('RoleMappingCtrl', function($scope, realm, User, users, role, RoleMapping, Notifications) {
|
||||
$scope.realm = realm;
|
||||
$scope.realmId = realm.realm || realm.id;
|
||||
$scope.realmId = realm.realm || realm.realm;
|
||||
$scope.allUsers = User.query({ realm : $scope.realmId });
|
||||
$scope.users = users;
|
||||
$scope.role = role;
|
||||
|
|
|
@ -107,12 +107,17 @@ module.factory('Notifications', function($rootScope, $timeout) {
|
|||
|
||||
module.factory('Realm', function($resource) {
|
||||
return $resource('/auth/rest/admin/realms/:id', {
|
||||
id : '@id'
|
||||
id : '@realm'
|
||||
}, {
|
||||
update : {
|
||||
method : 'PUT'
|
||||
}
|
||||
});
|
||||
},
|
||||
create : {
|
||||
method : 'POST',
|
||||
params : { id : ''}
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
module.factory('User', function($resource) {
|
||||
|
@ -120,9 +125,9 @@ module.factory('User', function($resource) {
|
|||
realm : '@realm',
|
||||
userId : '@userId'
|
||||
}, {
|
||||
update : {
|
||||
method : 'PUT'
|
||||
}
|
||||
update : {
|
||||
method : 'PUT'
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -321,7 +326,7 @@ module.factory('Current', function(Realm, $route) {
|
|||
current.realms = Realm.query(null, function(realms) {
|
||||
if ($route.current.params.realm) {
|
||||
for (var i = 0; i < realms.length; i++) {
|
||||
if (realms[i].id == $route.current.params.realm) {
|
||||
if (realms[i].realm == $route.current.params.realm) {
|
||||
current.realm = realms[i];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,19 +4,19 @@
|
|||
<div id="content-area" class="col-md-9" role="main">
|
||||
<div class="top-nav">
|
||||
<ul class="rcue-tabs">
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}">Settings</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.id}}/applications/{{application.id}}/credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}/installation">Installation</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}/roles">Roles</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}/scope-mappings">Scope</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}/sessions">Sessions</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}">Settings</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/installation">Installation</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/roles">Roles</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/scope-mappings">Scope</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/sessions">Sessions</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<ol class="breadcrumb" data-ng-hide="create">
|
||||
<li><a href="#/realms/{{realm.id}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications">Applications</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}">{{application.name}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications">Applications</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}">{{application.name}}</a></li>
|
||||
<li class="active">Credentials</li>
|
||||
</ol>
|
||||
<h2 data-ng-hide="create"><span>{{application.name}}</span> Credentials</h2>
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
<div id="content-area" class="col-md-9" role="main">
|
||||
<div class="top-nav" data-ng-show="!create">
|
||||
<ul class="rcue-tabs">
|
||||
<li class="active"><a href="#/realms/{{realm.id}}/applications/{{application.id}}">Settings</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}/credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}/installation">Installation</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}/roles">Roles</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}/scope-mappings">Scope</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}/sessions">Sessions</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.realm}}/applications/{{application.id}}">Settings</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/installation">Installation</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/roles">Roles</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/scope-mappings">Scope</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/sessions">Sessions</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="top-nav" data-ng-show="create">
|
||||
|
@ -19,16 +19,16 @@
|
|||
</div>
|
||||
<div id="content">
|
||||
<ol class="breadcrumb" data-ng-show="create">
|
||||
<li><a href="#/realms/{{realm.id}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications">Applications</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications">Applications</a></li>
|
||||
<li class="active">Add Application</li>
|
||||
</ol>
|
||||
<h2 class="pull-left" data-ng-show="create"><span>{{realm.realm}}</span> Add Application</h2>
|
||||
<p class="subtitle" data-ng-show="create"><span class="required">*</span> Required fields</p>
|
||||
<ol class="breadcrumb" data-ng-hide="create">
|
||||
<li><a href="#/realms/{{realm.id}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications">Applications</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}">{{application.name}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications">Applications</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}">{{application.name}}</a></li>
|
||||
<li class="active">Settings</li>
|
||||
</ol>
|
||||
<h2 data-ng-hide="create"><span>{{application.name}}</span> Settings</h2>
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
<div id="content-area" class="col-md-9" role="main">
|
||||
<div class="top-nav" data-ng-show="!create">
|
||||
<ul class="rcue-tabs">
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}">Settings</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}/credentials">Credentials</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.id}}/applications/{{application.id}}/installation">Installation</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}/roles">Roles</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}/scope-mappings">Scope</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}/sessions">Sessions</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}">Settings</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/credentials">Credentials</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/installation">Installation</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/roles">Roles</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/scope-mappings">Scope</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/sessions">Sessions</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="top-nav" data-ng-show="create">
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
</div>
|
||||
<div id="content">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="#/realms/{{realm.id}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">{{realm.realm}}</a></li>
|
||||
<li class="active">Applications</li>
|
||||
</ol>
|
||||
<h2><span>{{realm.realm}}</span> Applications</h2>
|
||||
<div class="feedback info inline" data-ng-show="!applications || applications.length == 0">
|
||||
<p><strong>You have not configured applications.</strong> <a class="button" href="#/create/application/{{realm.id}}">Add Application</a></p>
|
||||
<p><strong>You have not configured applications.</strong> <a class="button" href="#/create/application/{{realm.realm}}">Add Application</a></p>
|
||||
</div>
|
||||
<table data-ng-hide="applications.length == 0">
|
||||
<thead>
|
||||
|
@ -29,7 +29,7 @@
|
|||
</button>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<a class="button" href="#/create/application/{{realm.id}}">Add Application</a>
|
||||
<a class="button" href="#/create/application/{{realm.realm}}">Add Application</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
|
@ -53,7 +53,7 @@
|
|||
</tfoot>
|
||||
<tbody>
|
||||
<tr ng-repeat="app in applications | filter:search">
|
||||
<td><a href="#/realms/{{realm.id}}/applications/{{app.id}}">{{app.name}}</a></td>
|
||||
<td><a href="#/realms/{{realm.realm}}/applications/{{app.id}}">{{app.name}}</a></td>
|
||||
<td>{{app.enabled}}</td>
|
||||
<td ng-class="{'text-muted': !app.baseUrl}">{{app.baseUrl || "Not defined"}}</td>
|
||||
</tr>
|
||||
|
|
|
@ -4,30 +4,30 @@
|
|||
<div id="content-area" class="col-md-9" role="main">
|
||||
<div class="top-nav">
|
||||
<ul class="rcue-tabs">
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}">Settings</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}/credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}/installation">Installation</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.id}}/applications/{{application.id}}/roles">Roles</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}/scope-mappings">Scope</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}/sessions">Sessions</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}">Settings</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/installation">Installation</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/roles">Roles</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/scope-mappings">Scope</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/sessions">Sessions</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<ol class="breadcrumb" data-ng-show="create">
|
||||
<li><a href="#/realms/{{realm.id}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications">Applications</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}">{{application.name}}</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}/roles">Roles</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications">Applications</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}">{{application.name}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/roles">Roles</a></li>
|
||||
<li class="active">Add role</li>
|
||||
</ol>
|
||||
<h2 class="pull-left" data-ng-show="create"><span>{{application.name}}</span> Add Role</h2>
|
||||
<p class="subtitle" data-ng-show="create"><span class="required">*</span> Required fields</p>
|
||||
|
||||
<ol class="breadcrumb" data-ng-hide="create">
|
||||
<li><a href="#/realms/{{realm.id}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications">Applications</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}">{{application.name}}</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}/roles">Roles</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications">Applications</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}">{{application.name}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/roles">Roles</a></li>
|
||||
<li class="active">{{role.name}}</li>
|
||||
</ol>
|
||||
|
||||
|
|
|
@ -4,24 +4,24 @@
|
|||
<div id="content-area" class="col-md-9" role="main">
|
||||
<div class="top-nav">
|
||||
<ul class="rcue-tabs">
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}">Settings</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}/credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}/installation">Installation</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.id}}/applications/{{application.id}}/roles">Roles</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}/scope-mappings">Scope</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}/sessions">Sessions</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}">Settings</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/installation">Installation</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/roles">Roles</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/scope-mappings">Scope</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/sessions">Sessions</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<ol class="breadcrumb" data-ng-hide="create">
|
||||
<li><a href="#/realms/{{realm.id}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications">Applications</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}">{{application.name}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications">Applications</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}">{{application.name}}</a></li>
|
||||
<li class="active">Roles</li>
|
||||
</ol>
|
||||
<h2><span>{{application.name}}</span> Roles</h2>
|
||||
<div class="feedback info inline" data-ng-show="!roles || roles.length == 0">
|
||||
<p><strong>You have not configured application roles.</strong> <a class="button" href="#/create/role/{{realm.id}}/applications/{{application.id}}">Add Role</a></p>
|
||||
<p><strong>You have not configured application roles.</strong> <a class="button" href="#/create/role/{{realm.realm}}/applications/{{application.id}}">Add Role</a></p>
|
||||
</div>
|
||||
<table data-ng-hide="!roles || roles.length == 0">
|
||||
<caption data-ng-show="roles && roles.length > 0" class="hidden">Table of realm roles</caption>
|
||||
|
@ -29,7 +29,7 @@
|
|||
<tr>
|
||||
<th class="rcue-table-actions" colspan="2">
|
||||
<div class="actions">
|
||||
<a class="button" href="#/create/role/{{realm.id}}/applications/{{application.id}}">Add Role</a>
|
||||
<a class="button" href="#/create/role/{{realm.realm}}/applications/{{application.id}}">Add Role</a>
|
||||
<!-- <button class="remove disabled">Remove</button> -->
|
||||
</div>
|
||||
</th>
|
||||
|
@ -64,7 +64,7 @@
|
|||
</tfoot>
|
||||
<tbody>
|
||||
<tr ng-repeat="role in roles">
|
||||
<td><a href="#/realms/{{realm.id}}/applications/{{application.id}}/roles/{{role.id}}">{{role.name}}</a></td>
|
||||
<td><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/roles/{{role.id}}">{{role.name}}</a></td>
|
||||
<td>{{role.description}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
|
@ -4,19 +4,19 @@
|
|||
<div id="content-area" class="col-md-9" role="main">
|
||||
<div class="top-nav">
|
||||
<ul class="rcue-tabs">
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}">Settings</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}/credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}">Settings</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/credentials">Credentials</a></li>
|
||||
<li><a href="#">Installation</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}/roles">Roles</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.id}}/applications/{{application.id}}/scope-mappings">Scope</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}/sessions">Sessions</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/roles">Roles</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/scope-mappings">Scope</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/sessions">Sessions</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<ol class="breadcrumb" data-ng-hide="create">
|
||||
<li><a href="#/realms/{{realm.id}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications">Applications</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}">{{application.name}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications">Applications</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}">{{application.name}}</a></li>
|
||||
<li class="active">Scope</li>
|
||||
</ol>
|
||||
<h2 class="pull-left"><span>{{application.name}}</span> Scope Mappings</h2>
|
||||
|
|
|
@ -4,19 +4,19 @@
|
|||
<div id="content-area" class="col-md-9" role="main">
|
||||
<div class="top-nav">
|
||||
<ul class="rcue-tabs">
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}">Settings</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}/credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}/installation">Installation</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}/roles">Roles</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}/scope-mappings">Scope</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.id}}/applications/{{application.id}}/sessions">Sessions</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}">Settings</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/installation">Installation</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/roles">Roles</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/scope-mappings">Scope</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.realm}}/applications/{{application.id}}/sessions">Sessions</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<ol class="breadcrumb" data-ng-hide="create">
|
||||
<li><a href="#/realms/{{realm.id}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications">Applications</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/applications/{{application.id}}">{{application.name}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications">Applications</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/applications/{{application.id}}">{{application.name}}</a></li>
|
||||
<li class="active">Sessions</li>
|
||||
</ol>
|
||||
<h2 data-ng-hide="create"><span>{{application.name}}</span> Sessions (Placeholder Page)</h2>
|
||||
|
|
|
@ -4,17 +4,17 @@
|
|||
<div id="content-area" class="col-md-9" role="main">
|
||||
<div class="top-nav">
|
||||
<ul class="rcue-tabs">
|
||||
<li><a href="#/realms/{{realm.id}}/oauth-clients/{{oauth.id}}">Settings</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.id}}/oauth-clients/{{oauth.id}}/credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/oauth-clients/{{oauth.id}}/scope-mappings">Scope</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/oauth-clients/{{oauth.id}}/installation">Installation</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/oauth-clients/{{oauth.id}}">Settings</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.realm}}/oauth-clients/{{oauth.id}}/credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/oauth-clients/{{oauth.id}}/scope-mappings">Scope</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/oauth-clients/{{oauth.id}}/installation">Installation</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<ol class="breadcrumb" data-ng-hide="create">
|
||||
<li><a href="#/realms/{{realm.id}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/oauth-clients">OAuth Clients</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/oauth-clients/{{oauth.id}}">{{oauth.name}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/oauth-clients">OAuth Clients</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/oauth-clients/{{oauth.id}}">{{oauth.name}}</a></li>
|
||||
<li class="active">Credentials</li>
|
||||
</ol>
|
||||
<h2 data-ng-hide="create"><span>{{oauth.name}}</span> Credentials</h2>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<div id="content-area" class="col-md-9" role="main">
|
||||
<div class="top-nav" data-ng-show="!create">
|
||||
<ul class="rcue-tabs">
|
||||
<li class="active"><a href="#/realms/{{realm.id}}/oauth-clients/{{oauth.id}}">Settings</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/oauth-clients/{{oauth.id}}/credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/oauth-clients/{{oauth.id}}/scope-mappings">Scope</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/oauth-clients/{{oauth.id}}/installation">Installation</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.realm}}/oauth-clients/{{oauth.id}}">Settings</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/oauth-clients/{{oauth.id}}/credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/oauth-clients/{{oauth.id}}/scope-mappings">Scope</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/oauth-clients/{{oauth.id}}/installation">Installation</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="top-nav" data-ng-show="create">
|
||||
|
@ -17,16 +17,16 @@
|
|||
</div>
|
||||
<div id="content">
|
||||
<ol class="breadcrumb" data-ng-show="create">
|
||||
<li><a href="#/realms/{{realm.id}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/oauth-clients">OAuth Clients</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/oauth-clients">OAuth Clients</a></li>
|
||||
<li class="active">Add OAuth Client</li>
|
||||
</ol>
|
||||
<h2 class="pull-left" data-ng-show="create"><span>{{realm.realm}}</span> Add OAuth Client</h2>
|
||||
<p class="subtitle" data-ng-show="create"><span class="required">*</span> Required fields</p>
|
||||
<ol class="breadcrumb" data-ng-hide="create">
|
||||
<li><a href="#/realms/{{realm.id}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/oauth-clients">OAuth Clients</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/oauth-clients/{{oauth.id}}">{{oauth.name}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/oauth-clients">OAuth Clients</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/oauth-clients/{{oauth.id}}">{{oauth.name}}</a></li>
|
||||
<li class="active">Settings</li>
|
||||
</ol>
|
||||
<h2 data-ng-hide="create"><span>{{oauth.name}}</span> Settings</h2>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<div id="content-area" class="col-md-9" role="main">
|
||||
<div class="top-nav" data-ng-show="!create">
|
||||
<ul class="rcue-tabs">
|
||||
<li><a href="#/realms/{{realm.id}}/oauth-clients/{{oauth.id}}">Settings</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/oauth-clients/{{oauth.id}}/credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/oauth-clients/{{oauth.id}}/scope-mappings">Scope</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.id}}/oauth-clients/{{oauth.id}}/installation">Installation</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/oauth-clients/{{oauth.id}}">Settings</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/oauth-clients/{{oauth.id}}/credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/oauth-clients/{{oauth.id}}/scope-mappings">Scope</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.realm}}/oauth-clients/{{oauth.id}}/installation">Installation</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="top-nav" data-ng-show="create">
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
</div>
|
||||
<div id="content">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="#/realms/{{realm.id}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">{{realm.realm}}</a></li>
|
||||
<li class="active">OAuth Clients</li>
|
||||
</ol>
|
||||
<h2><span>{{realm.realm}}</span> OAuth Clients</h2>
|
||||
<div class="feedback info inline" data-ng-show="!oauthClients || oauthClients.length == 0">
|
||||
<p><strong>You have not configured oauth clients.</strong> <a class="button" href="#/create/oauth-client/{{realm.id}}">Add OAuth Client</a></p>
|
||||
<p><strong>You have not configured oauth clients.</strong> <a class="button" href="#/create/oauth-client/{{realm.realm}}">Add OAuth Client</a></p>
|
||||
</div>
|
||||
<table data-ng-hide="oauthClients.length == 0">
|
||||
<thead>
|
||||
|
@ -29,7 +29,7 @@
|
|||
</button>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<a class="button" href="#/create/oauth-client/{{realm.id}}">Add OAuth Client</a>
|
||||
<a class="button" href="#/create/oauth-client/{{realm.realm}}">Add OAuth Client</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
|
@ -52,7 +52,7 @@
|
|||
</tfoot>
|
||||
<tbody>
|
||||
<tr ng-repeat="client in oauthClients">
|
||||
<td><a href="#/realms/{{realm.id}}/oauth-clients/{{client.id}}">{{client.name}}</a></td>
|
||||
<td><a href="#/realms/{{realm.realm}}/oauth-clients/{{client.id}}">{{client.name}}</a></td>
|
||||
<td>{{client.enabled}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
|
@ -4,17 +4,17 @@
|
|||
<div id="content-area" class="col-md-9" role="main">
|
||||
<div class="top-nav">
|
||||
<ul class="rcue-tabs">
|
||||
<li><a href="#/realms/{{realm.id}}/oauth-clients/{{oauth.id}}">Settings</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/oauth-clients/{{oauth.id}}/credentials">Credentials</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.id}}/oauth-clients/{{oauth.id}}/scope-mappings">Scope</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/oauth-clients/{{oauth.id}}/installation">Installation</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/oauth-clients/{{oauth.id}}">Settings</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/oauth-clients/{{oauth.id}}/credentials">Credentials</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.realm}}/oauth-clients/{{oauth.id}}/scope-mappings">Scope</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/oauth-clients/{{oauth.id}}/installation">Installation</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<ol class="breadcrumb" data-ng-hide="create">
|
||||
<li><a href="#/realms/{{realm.id}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/oauth-clients">OAuth Clients</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/oauth-clients/{{oauth.id}}">{{oauth.name}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/oauth-clients">OAuth Clients</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/oauth-clients/{{oauth.id}}">{{oauth.name}}</a></li>
|
||||
<li class="active">Scope</li>
|
||||
</ol>
|
||||
<h2 class="pull-left"><span>{{oauth.name}}</span> Scope Mappings</h2>
|
||||
|
|
|
@ -4,20 +4,20 @@
|
|||
<div id="content-area" class="col-md-9" role="main">
|
||||
<div class="top-nav" data-ng-hide="createRealm">
|
||||
<ul class="rcue-tabs">
|
||||
<li><a href="#/realms/{{realm.id}}">General</a></li>
|
||||
<li data-ng-show="realm.social"><a href="#/realms/{{realm.id}}/social-settings">Social</a></li>
|
||||
<li data-ng-show="realm.registrationAllowed"><a href="#/realms/{{realm.id}}/registration-settings">Registration</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/roles">Roles</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.id}}/required-credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/token-settings">Token</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/keys-settings">Keys</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/smtp-settings">SMTP</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">General</a></li>
|
||||
<li data-ng-show="realm.social"><a href="#/realms/{{realm.realm}}/social-settings">Social</a></li>
|
||||
<li data-ng-show="realm.registrationAllowed"><a href="#/realms/{{realm.realm}}/registration-settings">Registration</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/roles">Roles</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.realm}}/required-credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/token-settings">Token</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/keys-settings">Keys</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/smtp-settings">SMTP</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="#/realms/{{realm.id}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}">Settings</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">Settings</a></li>
|
||||
<li class="active">Required Credentials</li>
|
||||
</ol>
|
||||
<h2><span>{{realm.realm}}</span> Credentials</h2>
|
||||
|
|
|
@ -4,20 +4,20 @@
|
|||
<div id="content-area" class="col-md-9" role="main">
|
||||
<div class="top-nav" data-ng-hide="createRealm">
|
||||
<ul class="rcue-tabs">
|
||||
<li class="active"><a href="#/realms/{{realm.id}}">General</a></li>
|
||||
<li data-ng-show="social"><a href="#/realms/{{realm.id}}/social-settings">Social</a></li>
|
||||
<li data-ng-show="registrationAllowed"><a href="#/realms/{{realm.id}}/registration-settings">Registration</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/roles">Roles</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/required-credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/token-settings">Token</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/keys-settings">Keys</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/smtp-settings">SMTP</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.realm}}">General</a></li>
|
||||
<li data-ng-show="social"><a href="#/realms/{{realm.realm}}/social-settings">Social</a></li>
|
||||
<li data-ng-show="registrationAllowed"><a href="#/realms/{{realm.realm}}/registration-settings">Registration</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/roles">Roles</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/required-credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/token-settings">Token</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/keys-settings">Keys</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/smtp-settings">SMTP</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<ol class="breadcrumb" data-ng-hide="createRealm">
|
||||
<li><a href="#/realms/{{realm.id}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}">Settings</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">Settings</a></li>
|
||||
<li class="active">General</li>
|
||||
</ol>
|
||||
<h2 class="pull-left" data-ng-show="createRealm">Add Realm</h2>
|
||||
|
|
|
@ -4,20 +4,20 @@
|
|||
<div id="content-area" class="col-md-9" role="main">
|
||||
<div class="top-nav" data-ng-hide="createRealm">
|
||||
<ul class="rcue-tabs">
|
||||
<li><a href="#/realms/{{realm.id}}">General</a></li>
|
||||
<li data-ng-show="realm.social"><a href="#/realms/{{realm.id}}/social-settings">Social</a></li>
|
||||
<li data-ng-show="realm.registrationAllowed"><a href="#/realms/{{realm.id}}/registration-settings">Registration</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/roles">Roles</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/required-credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/token-settings">Token</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.id}}/keys-settings">Keys</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/smtp-settings">SMTP</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">General</a></li>
|
||||
<li data-ng-show="realm.social"><a href="#/realms/{{realm.realm}}/social-settings">Social</a></li>
|
||||
<li data-ng-show="realm.registrationAllowed"><a href="#/realms/{{realm.realm}}/registration-settings">Registration</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/roles">Roles</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/required-credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/token-settings">Token</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.realm}}/keys-settings">Keys</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/smtp-settings">SMTP</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="#/realms/{{realm.id}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}">Settings</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">Settings</a></li>
|
||||
<li class="active">Keys</li>
|
||||
</ol>
|
||||
<h2><span>{{realm.realm}}</span> Keys</h2>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tr data-ng-repeat="r in realms">
|
||||
<td><a href="#/realms/{{r.id}}">{{r.realm}}</a></td>
|
||||
<td><a href="#/realms/{{r.realm}}">{{r.realm}}</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<ul data-ng-hide="createRealm">
|
||||
<li data-ng-class="((!path[2] || path[1] == 'role' || path[2] == 'roles' || path[2] == 'token-settings' ||
|
||||
path[2] == 'social-settings' || path[2] == 'required-credentials' || path[2] == 'registration-settings' ||
|
||||
path[2] == 'keys-settings' || path[2] == 'smtp-settings') && path[3] != 'applications') && 'active'"><a href="#/realms/{{realm.id}}">Settings</a></li>
|
||||
<li data-ng-class="(path[2] == 'users' || path[1] == 'user') && 'active'"><a href="#/realms/{{realm.id}}/users">Users</a>
|
||||
path[2] == 'keys-settings' || path[2] == 'smtp-settings') && path[3] != 'applications') && 'active'"><a href="#/realms/{{realm.realm}}">Settings</a></li>
|
||||
<li data-ng-class="(path[2] == 'users' || path[1] == 'user') && 'active'"><a href="#/realms/{{realm.realm}}/users">Users</a>
|
||||
</li>
|
||||
<li data-ng-class="(path[2] == 'applications' || path[1] == 'application' || path[3] == 'applications') && 'active'"><a href="#/realms/{{realm.id}}/applications">Applications</a></li>
|
||||
<li data-ng-class="(path[2] == 'oauth-clients' || path[1] == 'oauth-client') && 'active'"><a href="#/realms/{{realm.id}}/oauth-clients">OAuth Clients</a></li>
|
||||
<li data-ng-class="(path[2] == 'applications' || path[1] == 'application' || path[3] == 'applications') && 'active'"><a href="#/realms/{{realm.realm}}/applications">Applications</a></li>
|
||||
<li data-ng-class="(path[2] == 'oauth-clients' || path[1] == 'oauth-client') && 'active'"><a href="#/realms/{{realm.realm}}/oauth-clients">OAuth Clients</a></li>
|
||||
</ul>
|
||||
|
||||
|
|
|
@ -4,20 +4,20 @@
|
|||
<div id="content-area" class="col-md-9" role="main">
|
||||
<div class="top-nav" data-ng-hide="createRealm">
|
||||
<ul class="rcue-tabs">
|
||||
<li><a href="#/realms/{{realm.id}}">General</a></li>
|
||||
<li data-ng-show="realm.social"><a href="#/realms/{{realm.id}}/social-settings">Social</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.id}}/registration-settings">Registration</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/roles">Roles</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/required-credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/token-settings">Token</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/keys-settings">Keys</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/smtp-settings">SMTP</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">General</a></li>
|
||||
<li data-ng-show="realm.social"><a href="#/realms/{{realm.realm}}/social-settings">Social</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.realm}}/registration-settings">Registration</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/roles">Roles</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/required-credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/token-settings">Token</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/keys-settings">Keys</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/smtp-settings">SMTP</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="#/realms/{{realm.id}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}">Settings</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">Settings</a></li>
|
||||
<li class="active">Registration</li>
|
||||
</ol>
|
||||
<h2><span>{{realm.realm}}</span> Registration Settings</h2>
|
||||
|
|
|
@ -4,20 +4,20 @@
|
|||
<div id="content-area" class="col-md-9" role="main">
|
||||
<div class="top-nav" data-ng-hide="createRealm">
|
||||
<ul class="rcue-tabs">
|
||||
<li><a href="#/realms/{{realm.id}}">General</a></li>
|
||||
<li data-ng-show="realm.social"><a href="#/realms/{{realm.id}}/social-settings">Social</a></li>
|
||||
<li data-ng-show="realm.registrationAllowed"><a href="#/realms/{{realm.id}}/registration-settings">Registration</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/roles">Roles</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/required-credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/token-settings">Token</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/keys-settings">Keys</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.id}}/smtp-settings">SMTP</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">General</a></li>
|
||||
<li data-ng-show="realm.social"><a href="#/realms/{{realm.realm}}/social-settings">Social</a></li>
|
||||
<li data-ng-show="realm.registrationAllowed"><a href="#/realms/{{realm.realm}}/registration-settings">Registration</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/roles">Roles</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/required-credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/token-settings">Token</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/keys-settings">Keys</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.realm}}/smtp-settings">SMTP</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="#/realms/{{realm.id}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}">Settings</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">Settings</a></li>
|
||||
<li class="active">SMTP Configuration</li>
|
||||
</ol>
|
||||
<h2 class="pull-left"><span>{{realm.realm}}</span> SMTP Settings</h2>
|
||||
|
|
|
@ -4,20 +4,20 @@
|
|||
<div id="content-area" class="col-md-9" role="main">
|
||||
<div class="top-nav" data-ng-hide="createRealm">
|
||||
<ul class="rcue-tabs">
|
||||
<li><a href="#/realms/{{realm.id}}">General</a></li>
|
||||
<li class="active" data-ng-show="realm.social"><a href="#/realms/{{realm.id}}/social-settings">Social</a></li>
|
||||
<li data-ng-show="realm.registrationAllowed"><a href="#/realms/{{realm.id}}/registration-settings">Registration</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/roles">Roles</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/required-credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/token-settings">Token</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/keys-settings">Keys</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/smtp-settings">SMTP</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">General</a></li>
|
||||
<li class="active" data-ng-show="realm.social"><a href="#/realms/{{realm.realm}}/social-settings">Social</a></li>
|
||||
<li data-ng-show="realm.registrationAllowed"><a href="#/realms/{{realm.realm}}/registration-settings">Registration</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/roles">Roles</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/required-credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/token-settings">Token</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/keys-settings">Keys</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/smtp-settings">SMTP</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="#/realms/{{realm.id}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}">Settings</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">Settings</a></li>
|
||||
<li class="active">Social</li>
|
||||
</ol>
|
||||
<h2><span>{{realm.realm}}</span> Social Providers Settings</h2>
|
||||
|
|
|
@ -4,20 +4,20 @@
|
|||
<div id="content-area" class="col-md-9" role="main">
|
||||
<div class="top-nav" data-ng-hide="createRealm">
|
||||
<ul class="rcue-tabs">
|
||||
<li><a href="#/realms/{{realm.id}}">General</a></li>
|
||||
<li data-ng-show="realm.social"><a href="#/realms/{{realm.id}}/social-settings">Social</a></li>
|
||||
<li data-ng-show="realm.registrationAllowed"><a href="#/realms/{{realm.id}}/registration-settings">Registration</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/roles">Roles</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/required-credentials">Credentials</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.id}}/token-settings">Token</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/keys-settings">Keys</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/smtp-settings">SMTP</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">General</a></li>
|
||||
<li data-ng-show="realm.social"><a href="#/realms/{{realm.realm}}/social-settings">Social</a></li>
|
||||
<li data-ng-show="realm.registrationAllowed"><a href="#/realms/{{realm.realm}}/registration-settings">Registration</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/roles">Roles</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/required-credentials">Credentials</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.realm}}/token-settings">Token</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/keys-settings">Keys</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/smtp-settings">SMTP</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="#/realms/{{realm.id}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}">Settings</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">Settings</a></li>
|
||||
<li class="active">Token</li>
|
||||
</ol>
|
||||
<h2><span>{{realm.realm}}</span> Token Settings</h2>
|
||||
|
|
|
@ -4,28 +4,28 @@
|
|||
<div id="content-area" class="col-md-9" role="main">
|
||||
<div class="top-nav">
|
||||
<ul class="rcue-tabs">
|
||||
<li><a href="#/realms/{{realm.id}}">General</a></li>
|
||||
<li data-ng-show="realm.social"><a href="#/realms/{{realm.id}}/social-settings">Social</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/registration-settings">Registration</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.id}}/roles">Roles</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/required-credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/token-settings">Token</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/keys-settings">Keys</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/smtp-settings">SMTP</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">General</a></li>
|
||||
<li data-ng-show="realm.social"><a href="#/realms/{{realm.realm}}/social-settings">Social</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/registration-settings">Registration</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.realm}}/roles">Roles</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/required-credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/token-settings">Token</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/keys-settings">Keys</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/smtp-settings">SMTP</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<ol class="breadcrumb" data-ng-hide="create">
|
||||
<li><a href="#/realms/{{realm.id}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}">Settings</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/roles">Roles</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">Settings</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/roles">Roles</a></li>
|
||||
<li class="active">{{role.name}}</li>
|
||||
</ol>
|
||||
<h2 class="pull-left" data-ng-hide="create"><span>{{realm.realm}}</span> {{role.name}}</h2>
|
||||
<ol class="breadcrumb" data-ng-show="create">
|
||||
<li><a href="#/realms/{{realm.id}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}">Settings</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/roles">Roles</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">Settings</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/roles">Roles</a></li>
|
||||
<li class="active">Add Role</li>
|
||||
</ol>
|
||||
<h2 class="pull-left" data-ng-show="create"><span>{{realm.realm}}</span> Add Role</h2>
|
||||
|
|
|
@ -4,32 +4,32 @@
|
|||
<div id="content-area" class="col-md-9" role="main">
|
||||
<div class="top-nav">
|
||||
<ul class="rcue-tabs">
|
||||
<li><a href="#/realms/{{realm.id}}">General</a></li>
|
||||
<li data-ng-show="realm.social"><a href="#/realms/{{realm.id}}/social-settings">Social</a></li>
|
||||
<li data-ng-show="realm.registrationAllowed"><a href="#/realms/{{realm.id}}/registration-settings">Registration</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.id}}/roles">Roles</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/required-credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/token-settings">Token</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/keys-settings">Keys</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/smtp-settings">SMTP</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">General</a></li>
|
||||
<li data-ng-show="realm.social"><a href="#/realms/{{realm.realm}}/social-settings">Social</a></li>
|
||||
<li data-ng-show="realm.registrationAllowed"><a href="#/realms/{{realm.realm}}/registration-settings">Registration</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.realm}}/roles">Roles</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/required-credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/token-settings">Token</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/keys-settings">Keys</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/smtp-settings">SMTP</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="#/realms/{{realm.id}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}">Settings</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">Settings</a></li>
|
||||
<li class="active">Roles</li>
|
||||
</ol>
|
||||
<h2><span>{{realm.realm}}</span> Roles</h2>
|
||||
<div class="feedback info inline" data-ng-show="!roles || roles.length == 0">
|
||||
<p><strong>You have not configured realm roles.</strong> <a class="button" href="#/create/role/{{realm.id}}">Add Role</a></p>
|
||||
<p><strong>You have not configured realm roles.</strong> <a class="button" href="#/create/role/{{realm.realm}}">Add Role</a></p>
|
||||
</div>
|
||||
<table data-ng-hide="!roles || roles.length == 0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="rcue-table-actions" colspan="2">
|
||||
<div class="actions">
|
||||
<a class="button" href="#/create/role/{{realm.id}}">Add Role</a>
|
||||
<a class="button" href="#/create/role/{{realm.realm}}">Add Role</a>
|
||||
<!-- <button class="remove disabled">Remove</button> -->
|
||||
</div>
|
||||
</th>
|
||||
|
@ -64,7 +64,7 @@
|
|||
</tfoot>
|
||||
<tbody>
|
||||
<tr ng-repeat="role in roles">
|
||||
<td><a href="#/realms/{{realm.id}}/roles/{{role.id}}">{{role.name}}</a></td>
|
||||
<td><a href="#/realms/{{realm.realm}}/roles/{{role.id}}">{{role.name}}</a></td>
|
||||
<td>{{role.description}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
|
@ -4,16 +4,16 @@
|
|||
<div id="content-area" class="col-md-9" role="main">
|
||||
<div class="top-nav">
|
||||
<ul class="rcue-tabs" >
|
||||
<li><a href="#/realms/{{realm.id}}/users/{{user.username}}">Attributes</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/users/{{user.username}}/user-credentials">Credentials</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.id}}/users/{{user.username}}/role-mappings">Role Mappings</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/users/{{user.username}}">Attributes</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/users/{{user.username}}/user-credentials">Credentials</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.realm}}/users/{{user.username}}/role-mappings">Role Mappings</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="#/realms/{{realm.id}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/users">Users</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/users/{{user.username}}">{{user.username}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/users">Users</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/users/{{user.username}}">{{user.username}}</a></li>
|
||||
<li class="active">Role Mappings</li>
|
||||
</ol>
|
||||
<h2 class="pull-left"><span>{{user.username}}'s</span> Role Mappings</h2>
|
||||
|
|
|
@ -4,14 +4,14 @@
|
|||
<div id="content-area" class="col-md-9" role="main">
|
||||
<div class="top-nav">
|
||||
<ul class="rcue-tabs">
|
||||
<li><a href="#/realms/{{realm.id}}/users/{{user.username}}">Attributes</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.id}}/users/{{user.username}}/user-credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/users/{{user.username}}/role-mappings">Role Mappings</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/users/{{user.username}}">Attributes</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.realm}}/users/{{user.username}}/user-credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/users/{{user.username}}/role-mappings">Role Mappings</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="#/realms/{{realm.id}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">{{realm.realm}}</a></li>
|
||||
<li class="active">Users</li>
|
||||
</ol>
|
||||
<h2><span>{{user.username}}'s</span> Credentials</h2>
|
||||
|
|
|
@ -9,24 +9,24 @@
|
|||
</div>
|
||||
<div class="top-nav" data-ng-show="!create">
|
||||
<ul class="rcue-tabs" >
|
||||
<li class="active"><a href="#/realms/{{realm.id}}/users/{{user.username}}">Attributes</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/users/{{user.username}}/user-credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/users/{{user.username}}/role-mappings">Role Mappings</a></li>
|
||||
<li class="active"><a href="#/realms/{{realm.realm}}/users/{{user.username}}">Attributes</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/users/{{user.username}}/user-credentials">Credentials</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/users/{{user.username}}/role-mappings">Role Mappings</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<ol class="breadcrumb" data-ng-show="create">
|
||||
<li><a href="#/realms/{{realm.id}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/users">Users</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/users">Users</a></li>
|
||||
<li class="active">Add</li>
|
||||
</ol>
|
||||
<h2 class="pull-left" data-ng-show="create">Add User</h2>
|
||||
<p class="subtitle" data-ng-show="create"><span class="required">*</span> Required fields</p>
|
||||
|
||||
<ol class="breadcrumb" data-ng-hide="create">
|
||||
<li><a href="#/realms/{{realm.id}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/users">Users</a></li>
|
||||
<li><a href="#/realms/{{realm.id}}/users/{{user.username}}">{{user.username}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/users">Users</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}/users/{{user.username}}">{{user.username}}</a></li>
|
||||
<li class="active">Attributes</li>
|
||||
</ol>
|
||||
<h2 class="pull-left" data-ng-hide="create"><span>{{user.username}}'s</span> Attributes</h2>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</div>
|
||||
<div id="content">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="#/realms/{{realm.id}}">{{realm.realm}}</a></li>
|
||||
<li><a href="#/realms/{{realm.realm}}">{{realm.realm}}</a></li>
|
||||
<li class="active">Users</li>
|
||||
</ol>
|
||||
<h2><span>{{realm.realm}}</span> Users</h2>
|
||||
|
@ -29,7 +29,7 @@
|
|||
</div>
|
||||
<span><span>or</span><button class="link" ng-click="search = null; searchQuery()">View all users</button></span>
|
||||
<div class="actions">
|
||||
<a class="button" href="#/create/user/{{realm.id}}">Add User</a>
|
||||
<a class="button" href="#/create/user/{{realm.realm}}">Add User</a>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
|
@ -57,7 +57,7 @@
|
|||
</tfoot>-->
|
||||
<tbody>
|
||||
<tr ng-repeat="user in users">
|
||||
<td><a href="#/realms/{{realm.id}}/users/{{user.username}}">{{user.username}}</a></td>
|
||||
<td><a href="#/realms/{{realm.realm}}/users/{{user.username}}">{{user.username}}</a></td>
|
||||
<td>{{user.lastName}}</td>
|
||||
<td>{{user.firstName}}</td>
|
||||
<td>{{user.email}}</td>
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
package org.keycloak.adapters;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
||||
* @version $Revision: 1 $
|
||||
*/
|
||||
public interface AdapterAdminResourceConstants {
|
||||
public static final String LOGOUT = "k_logout";
|
||||
}
|
12
core/src/main/java/org/keycloak/adapters/AdapterConstants.java
Executable file
12
core/src/main/java/org/keycloak/adapters/AdapterConstants.java
Executable file
|
@ -0,0 +1,12 @@
|
|||
package org.keycloak.adapters;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
||||
* @version $Revision: 1 $
|
||||
*/
|
||||
public interface AdapterConstants {
|
||||
|
||||
// URL endpoints
|
||||
public static final String K_LOGOUT = "k_logout";
|
||||
public static final String K_QUERY_BEARER_TOKEN = "k_query_bearer_token";
|
||||
}
|
|
@ -174,7 +174,7 @@
|
|||
<listitem>
|
||||
<para>
|
||||
If<literal>true</literal>, an authenticated browser client (via a Javascript HTTP invocation)
|
||||
can obtain the signed access token via the URL<literal>root/K_QUERY_BEARER_TOKEN</literal>.
|
||||
can obtain the signed access token via the URL<literal>root/k_query_bearer_token</literal>.
|
||||
This is<emphasis>OPTIONAL</emphasis>. The default value is<emphasis>false</emphasis>.
|
||||
</para>
|
||||
</listitem>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<script type="text/javascript">
|
||||
console.log('here!!!!!');
|
||||
var xhr1 = new XMLHttpRequest();
|
||||
xhr1.open('GET', '/customer-portal/K_QUERY_BEARER_TOKEN');
|
||||
xhr1.open('GET', '/customer-portal/k_query_bearer_token');
|
||||
xhr1.onreadystatechange = function () {
|
||||
console.log('got here');
|
||||
if (this.status == 200 && this.readyState == 4) {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<script type="text/javascript">
|
||||
console.log('here!!!!!');
|
||||
var xhr1 = new XMLHttpRequest();
|
||||
xhr1.open('GET', '/customer-portal/K_QUERY_BEARER_TOKEN');
|
||||
xhr1.open('GET', '/customer-portal/k_query_bearer_token');
|
||||
xhr1.onreadystatechange = function () {
|
||||
console.log('got here');
|
||||
if (this.status == 200 && this.readyState == 4) {
|
||||
|
|
|
@ -52,6 +52,10 @@ public class UrlBean {
|
|||
this.referrerURI = referrerURI;
|
||||
}
|
||||
|
||||
protected String getRealmIdentifier() {
|
||||
return realm.getName();
|
||||
}
|
||||
|
||||
public RealmBean getRealm() {
|
||||
return realm;
|
||||
}
|
||||
|
@ -61,11 +65,11 @@ public class UrlBean {
|
|||
}
|
||||
|
||||
public String getAccessUrl() {
|
||||
return Urls.accountAccessPage(baseURI, realm.getId()).toString();
|
||||
return Urls.accountAccessPage(baseURI, getRealmIdentifier()).toString();
|
||||
}
|
||||
|
||||
public String getAccountUrl() {
|
||||
return Urls.accountPage(baseURI, realm.getId()).toString();
|
||||
return Urls.accountPage(baseURI, getRealmIdentifier()).toString();
|
||||
}
|
||||
|
||||
URI getBaseURI() {
|
||||
|
@ -73,24 +77,24 @@ public class UrlBean {
|
|||
}
|
||||
|
||||
public String getLoginAction() {
|
||||
return Urls.realmLoginAction(baseURI, realm.getId()).toString();
|
||||
return Urls.realmLoginAction(baseURI, getRealmIdentifier()).toString();
|
||||
}
|
||||
|
||||
public String getLoginUrl() {
|
||||
return Urls.realmLoginPage(baseURI, realm.getId()).toString();
|
||||
return Urls.realmLoginPage(baseURI, getRealmIdentifier()).toString();
|
||||
}
|
||||
|
||||
public String getPasswordUrl() {
|
||||
return Urls.accountPasswordPage(baseURI, realm.getId()).toString();
|
||||
return Urls.accountPasswordPage(baseURI, getRealmIdentifier()).toString();
|
||||
}
|
||||
|
||||
public String getRegistrationAction() {
|
||||
if (realm.isSaas()) {
|
||||
return Urls.saasRegisterAction(baseURI).toString();
|
||||
} else if (socialRegistration){
|
||||
return Urls.socialRegisterAction(baseURI, realm.getId()).toString();
|
||||
return Urls.socialRegisterAction(baseURI, getRealmIdentifier()).toString();
|
||||
} else {
|
||||
return Urls.realmRegisterAction(baseURI, realm.getId()).toString();
|
||||
return Urls.realmRegisterAction(baseURI, getRealmIdentifier()).toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -99,48 +103,48 @@ public class UrlBean {
|
|||
// TODO: saas social registration
|
||||
return Urls.saasRegisterPage(baseURI).toString();
|
||||
} else {
|
||||
return Urls.realmRegisterPage(baseURI, realm.getId()).toString();
|
||||
return Urls.realmRegisterPage(baseURI, getRealmIdentifier()).toString();
|
||||
}
|
||||
}
|
||||
|
||||
public String getLoginUpdatePasswordUrl() {
|
||||
return Urls.loginActionUpdatePassword(baseURI, realm.getId()).toString();
|
||||
return Urls.loginActionUpdatePassword(baseURI, getRealmIdentifier()).toString();
|
||||
}
|
||||
|
||||
public String getLoginUpdateTotpUrl() {
|
||||
return Urls.loginActionUpdateTotp(baseURI, realm.getId()).toString();
|
||||
return Urls.loginActionUpdateTotp(baseURI, getRealmIdentifier()).toString();
|
||||
}
|
||||
|
||||
public String getLoginUpdateProfileUrl() {
|
||||
return Urls.loginActionUpdateProfile(baseURI, realm.getId()).toString();
|
||||
return Urls.loginActionUpdateProfile(baseURI, getRealmIdentifier()).toString();
|
||||
}
|
||||
|
||||
public String getSocialUrl() {
|
||||
return Urls.accountSocialPage(baseURI, realm.getId()).toString();
|
||||
return Urls.accountSocialPage(baseURI, getRealmIdentifier()).toString();
|
||||
}
|
||||
|
||||
public String getTotpUrl() {
|
||||
return Urls.accountTotpPage(baseURI, realm.getId()).toString();
|
||||
return Urls.accountTotpPage(baseURI, getRealmIdentifier()).toString();
|
||||
}
|
||||
|
||||
public String getTotpRemoveUrl() {
|
||||
return Urls.accountTotpRemove(baseURI, realm.getId()).toString();
|
||||
return Urls.accountTotpRemove(baseURI, getRealmIdentifier()).toString();
|
||||
}
|
||||
|
||||
public String getLogoutUrl() {
|
||||
return Urls.accountLogout(baseURI, realm.getId()).toString();
|
||||
return Urls.accountLogout(baseURI, getRealmIdentifier()).toString();
|
||||
}
|
||||
|
||||
public String getLoginPasswordResetUrl() {
|
||||
return Urls.loginPasswordReset(baseURI, realm.getId()).toString();
|
||||
return Urls.loginPasswordReset(baseURI, getRealmIdentifier()).toString();
|
||||
}
|
||||
|
||||
public String getLoginUsernameReminderUrl() {
|
||||
return Urls.loginUsernameReminder(baseURI, realm.getId()).toString();
|
||||
return Urls.loginUsernameReminder(baseURI, getRealmIdentifier()).toString();
|
||||
}
|
||||
|
||||
public String getLoginEmailVerificationUrl() {
|
||||
return Urls.loginActionEmailVerification(baseURI, realm.getId()).toString();
|
||||
return Urls.loginActionEmailVerification(baseURI, getRealmIdentifier()).toString();
|
||||
}
|
||||
|
||||
public String getReferrerURI() {
|
||||
|
|
|
@ -8,6 +8,7 @@ import org.apache.catalina.connector.Response;
|
|||
import org.apache.catalina.valves.ValveBase;
|
||||
import org.jboss.logging.Logger;
|
||||
import org.keycloak.SkeletonKeySession;
|
||||
import org.keycloak.adapters.AdapterConstants;
|
||||
import org.keycloak.representations.adapters.config.AdapterConfig;
|
||||
import org.keycloak.representations.SkeletonKeyToken;
|
||||
|
||||
|
@ -22,7 +23,7 @@ import java.util.Set;
|
|||
* Actions include:
|
||||
* <p/>
|
||||
* CORS Origin Check and Response headers
|
||||
* K_QUERY_BEARER_TOKEN: Get bearer token from server for Javascripts CORS requests
|
||||
* k_query_bearer_token: Get bearer token from server for Javascripts CORS requests
|
||||
*
|
||||
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
||||
* @version $Revision: 1 $
|
||||
|
@ -46,7 +47,7 @@ public class AuthenticatedActionsValve extends ValveBase {
|
|||
SkeletonKeySession session = getSkeletonKeySession(request);
|
||||
if (corsRequest(request, response, session)) return;
|
||||
String requestUri = request.getRequestURI();
|
||||
if (requestUri.endsWith("K_QUERY_BEARER_TOKEN")) {
|
||||
if (requestUri.endsWith(AdapterConstants.K_QUERY_BEARER_TOKEN)) {
|
||||
queryBearerToken(request, response, session);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ import org.apache.catalina.core.StandardContext;
|
|||
import org.apache.catalina.deploy.LoginConfig;
|
||||
import org.apache.catalina.realm.GenericPrincipal;
|
||||
import org.jboss.logging.Logger;
|
||||
import org.keycloak.adapters.AdapterAdminResourceConstants;
|
||||
import org.keycloak.adapters.AdapterConstants;
|
||||
import org.keycloak.adapters.ResourceMetadata;
|
||||
import org.keycloak.SkeletonKeyPrincipal;
|
||||
import org.keycloak.SkeletonKeySession;
|
||||
|
@ -83,7 +83,7 @@ public class OAuthAuthenticatorValve extends FormAuthenticator implements Lifecy
|
|||
return;
|
||||
}
|
||||
String requestURI = request.getDecodedRequestURI();
|
||||
if (requestURI.endsWith(AdapterAdminResourceConstants.LOGOUT)) {
|
||||
if (requestURI.endsWith(AdapterConstants.K_LOGOUT)) {
|
||||
JWSInput input = verifyAdminRequest(request, response);
|
||||
if (input == null) {
|
||||
return; // we failed to verify the request
|
||||
|
|
|
@ -5,6 +5,7 @@ import io.undertow.server.HttpServerExchange;
|
|||
import io.undertow.util.Headers;
|
||||
import org.jboss.logging.Logger;
|
||||
import org.keycloak.SkeletonKeySession;
|
||||
import org.keycloak.adapters.AdapterConstants;
|
||||
import org.keycloak.representations.adapters.config.AdapterConfig;
|
||||
import org.keycloak.representations.SkeletonKeyToken;
|
||||
|
||||
|
@ -18,7 +19,7 @@ import java.util.Set;
|
|||
* Actions include:
|
||||
*
|
||||
* CORS Origin Check and Response headers
|
||||
* K_QUERY_BEARER_TOKEN: Get bearer token from server for Javascripts CORS requests
|
||||
* k_query_bearer_token: Get bearer token from server for Javascripts CORS requests
|
||||
*
|
||||
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
|
||||
* @version $Revision: 1 $
|
||||
|
@ -39,7 +40,7 @@ public class AuthenticatedActionsHandler implements HttpHandler {
|
|||
SkeletonKeySession session = getSkeletonKeySession(exchange);
|
||||
if (corsRequest(exchange, session)) return;
|
||||
String requestUri = exchange.getRequestURI();
|
||||
if (requestUri.endsWith("K_QUERY_BEARER_TOKEN")) {
|
||||
if (requestUri.endsWith(AdapterConstants.K_QUERY_BEARER_TOKEN)) {
|
||||
queryBearerToken(exchange, session);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ import io.undertow.server.HttpServerExchange;
|
|||
import io.undertow.server.session.SessionManager;
|
||||
import io.undertow.servlet.handlers.ServletRequestContext;
|
||||
import org.jboss.logging.Logger;
|
||||
import org.keycloak.adapters.AdapterAdminResourceConstants;
|
||||
import org.keycloak.adapters.AdapterConstants;
|
||||
import org.keycloak.adapters.config.RealmConfiguration;
|
||||
import org.keycloak.jose.jws.JWSInput;
|
||||
import org.keycloak.jose.jws.crypto.RSAProvider;
|
||||
|
@ -82,7 +82,7 @@ public class ServletAdminActionsHandler implements HttpHandler {
|
|||
HttpServletResponse response = (HttpServletResponse) servletRequestContext.getServletResponse();
|
||||
SessionManager manager = servletRequestContext.getDeployment().getSessionManager();
|
||||
String requestUri = exchange.getRequestURI();
|
||||
if (requestUri.endsWith(AdapterAdminResourceConstants.LOGOUT)) {
|
||||
if (requestUri.endsWith(AdapterConstants.K_LOGOUT)) {
|
||||
JWSInput token = verifyAdminRequest(request, response);
|
||||
if (token == null) return;
|
||||
userSessionManagement.remoteLogout(token, manager, response);
|
||||
|
|
|
@ -12,6 +12,7 @@ public interface KeycloakSession {
|
|||
RealmModel createRealm(String name);
|
||||
RealmModel createRealm(String id, String name);
|
||||
RealmModel getRealm(String id);
|
||||
RealmModel getRealmByName(String name);
|
||||
List<RealmModel> getRealms(UserModel admin);
|
||||
boolean removeRealm(String id);
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ public class JpaKeycloakSession implements KeycloakSession {
|
|||
|
||||
@Override
|
||||
public List<RealmModel> getRealms(UserModel admin) {
|
||||
TypedQuery<RealmEntity> query = em.createQuery("select r from RealmEntity r", RealmEntity.class);
|
||||
TypedQuery<RealmEntity> query = em.createNamedQuery("getAllRealms", RealmEntity.class);
|
||||
List<RealmEntity> entities = query.getResultList();
|
||||
List<RealmModel> realms = new ArrayList<RealmModel>();
|
||||
for (RealmEntity entity : entities) {
|
||||
|
@ -59,6 +59,18 @@ public class JpaKeycloakSession implements KeycloakSession {
|
|||
return realms;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RealmModel getRealmByName(String name) {
|
||||
TypedQuery<RealmEntity> query = em.createNamedQuery("getRealmByName", RealmEntity.class);
|
||||
query.setParameter("name", name);
|
||||
List<RealmEntity> entities = query.getResultList();
|
||||
if (entities.size() == 0) return null;
|
||||
if (entities.size() > 1) throw new IllegalStateException("Should not be more than one realm with same name");
|
||||
RealmEntity realm = query.getResultList().get(0);
|
||||
if (realm == null) return null;
|
||||
return new RealmAdapter(em, realm);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removeRealm(String id) {
|
||||
RealmEntity realm = em.find(RealmEntity.class, id);
|
||||
|
|
|
@ -10,6 +10,8 @@ import javax.persistence.FetchType;
|
|||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinTable;
|
||||
import javax.persistence.MapKeyColumn;
|
||||
import javax.persistence.NamedQueries;
|
||||
import javax.persistence.NamedQuery;
|
||||
import javax.persistence.OneToMany;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
@ -21,7 +23,10 @@ import java.util.Map;
|
|||
* @version $Revision: 1 $
|
||||
*/
|
||||
@Entity
|
||||
public class RealmEntity {
|
||||
@NamedQueries({
|
||||
@NamedQuery(name="getAllRealms", query="select realm from RealmEntity realm"),
|
||||
@NamedQuery(name="getRealmByName", query="select realm from RealmEntity realm where realm.name = :name"),
|
||||
})public class RealmEntity {
|
||||
@Id
|
||||
protected String id;
|
||||
|
||||
|
|
|
@ -94,6 +94,11 @@ public class PicketlinkKeycloakSession implements KeycloakSession {
|
|||
return new RealmAdapter(this, existing, partitionManager);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RealmModel getRealmByName(String name) {
|
||||
throw new RuntimeException("NOT IMPLEMENTED YET");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removeRealm(String id) {
|
||||
RealmData partition = partitionManager.getPartition(RealmData.class, id);
|
||||
|
|
|
@ -41,7 +41,7 @@ public class KeycloakServerApplication extends KeycloakApplication {
|
|||
throw new RuntimeException("Realm id not specified");
|
||||
}
|
||||
|
||||
if (manager.getRealm(rep.getId()) != null) {
|
||||
if (manager.getRealmByName(rep.getRealm()) != null) {
|
||||
log.info("Not importing realm " + rep.getRealm() + " realm already exists");
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -7,14 +7,19 @@
|
|||
<!-- Exclude JAVA EE of JBOSS (javax.ws..) => Add dependency javax.annotation -->
|
||||
<module name="javaee.api" />
|
||||
<!-- Exclude RestEasy conflict (javax.ws.rs.ext.RunDelegate) -->
|
||||
<module name="javax.ws.rs.api"/>
|
||||
<module name="org.codehaus.jackson.jackson-core-asl" />
|
||||
<module name="org.jboss.resteasy.resteasy-atom-provider" />
|
||||
<module name="org.jboss.resteasy.resteasy-cdi" />
|
||||
<module name="org.jboss.resteasy.resteasy-crypto" />
|
||||
<module name="org.jboss.resteasy.resteasy-jackson-provider" />
|
||||
<module name="org.jboss.resteasy.resteasy-jaxb-provider" />
|
||||
<module name="org.jboss.resteasy.resteasy-jaxrs" />
|
||||
<module name="org.jboss.resteasy.resteasy-jettison-provider" />
|
||||
<module name="org.jboss.resteasy.resteasy-jsapi" />
|
||||
<module name="org.jboss.resteasy.resteasy-json-p-provider" />
|
||||
<module name="org.jboss.resteasy.resteasy-multipart-provider" />
|
||||
<module name="org.jboss.resteasy.resteasy-validator-provider-11" />
|
||||
<module name="org.jboss.resteasy.resteasy-yaml-provider" />
|
||||
</exclusions>
|
||||
</deployment>
|
||||
|
|
|
@ -107,7 +107,7 @@ public class EmailSender {
|
|||
UriBuilder builder = Urls.loginActionEmailVerificationBuilder(uriInfo.getBaseUri());
|
||||
builder.queryParam("key", accessCode.getId());
|
||||
|
||||
URI uri = builder.build(realm.getId());
|
||||
URI uri = builder.build(realm.getName());
|
||||
|
||||
|
||||
StringBuilder sb = getHeader(user);
|
||||
|
@ -128,7 +128,7 @@ public class EmailSender {
|
|||
UriBuilder builder = Urls.loginPasswordResetBuilder(uriInfo.getBaseUri());
|
||||
builder.queryParam("key", accessCode.getId());
|
||||
|
||||
URI uri = builder.build(realm.getId());
|
||||
URI uri = builder.build(realm.getName());
|
||||
|
||||
StringBuilder sb = getHeader(user);
|
||||
|
||||
|
|
|
@ -177,12 +177,12 @@ public class ApplicationManager {
|
|||
|
||||
public BaseAdapterConfig toInstallationRepresentation(RealmModel realmModel, ApplicationModel applicationModel, URI baseUri) {
|
||||
BaseAdapterConfig rep = new BaseAdapterConfig();
|
||||
rep.setRealm(realmModel.getId());
|
||||
rep.setRealm(realmModel.getName());
|
||||
rep.setRealmKey(realmModel.getPublicKeyPem());
|
||||
rep.setSslNotRequired(realmModel.isSslNotRequired());
|
||||
|
||||
rep.setAuthUrl(Urls.realmLoginPage(baseUri, realmModel.getId()).toString());
|
||||
rep.setCodeUrl(Urls.realmCode(baseUri, realmModel.getId()).toString());
|
||||
rep.setAuthUrl(Urls.realmLoginPage(baseUri, realmModel.getName()).toString());
|
||||
rep.setCodeUrl(Urls.realmCode(baseUri, realmModel.getName()).toString());
|
||||
rep.setUseResourceRoleMappings(applicationModel.getRoles().size() > 0);
|
||||
|
||||
rep.setResource(applicationModel.getName());
|
||||
|
|
|
@ -13,7 +13,7 @@ import org.keycloak.models.UserModel;
|
|||
import org.keycloak.representations.SkeletonKeyToken;
|
||||
import org.keycloak.representations.idm.CredentialRepresentation;
|
||||
import org.keycloak.services.resources.AccountService;
|
||||
import org.keycloak.services.resources.AdminService;
|
||||
import org.keycloak.services.resources.admin.AdminService;
|
||||
import org.keycloak.services.resources.RealmsResource;
|
||||
|
||||
import javax.ws.rs.NotAuthorizedException;
|
||||
|
@ -43,7 +43,7 @@ public class AuthenticationManager {
|
|||
token.id(RealmManager.generateId());
|
||||
token.issuedNow();
|
||||
token.principal(username);
|
||||
token.audience(realm.getId());
|
||||
token.audience(realm.getName());
|
||||
if (realm.getTokenLifespan() > 0) {
|
||||
token.expiration((System.currentTimeMillis() / 1000) + realm.getTokenLifespan());
|
||||
}
|
||||
|
@ -53,8 +53,7 @@ public class AuthenticationManager {
|
|||
|
||||
public NewCookie createLoginCookie(RealmModel realm, UserModel user, UriInfo uriInfo) {
|
||||
String cookieName = KEYCLOAK_IDENTITY_COOKIE;
|
||||
URI uri = RealmsResource.realmBaseUrl(uriInfo).build(realm.getId());
|
||||
String cookiePath = uri.getRawPath();
|
||||
String cookiePath = getIdentityCookiePath(realm, uriInfo);
|
||||
return createLoginCookie(realm, user, null, cookieName, cookiePath);
|
||||
}
|
||||
|
||||
|
@ -92,13 +91,17 @@ public class AuthenticationManager {
|
|||
|
||||
|
||||
public void expireIdentityCookie(RealmModel realm, UriInfo uriInfo) {
|
||||
URI uri = RealmsResource.realmBaseUrl(uriInfo).build(realm.getId());
|
||||
logger.debug("Expiring identity cookie");
|
||||
String path = uri.getRawPath();
|
||||
String path = getIdentityCookiePath(realm, uriInfo);
|
||||
String cookieName = KEYCLOAK_IDENTITY_COOKIE;
|
||||
expireCookie(cookieName, path);
|
||||
}
|
||||
|
||||
protected String getIdentityCookiePath(RealmModel realm, UriInfo uriInfo) {
|
||||
URI uri = RealmsResource.realmBaseUrl(uriInfo).build(realm.getName());
|
||||
return uri.getRawPath();
|
||||
}
|
||||
|
||||
public void expireSaasIdentityCookie(UriInfo uriInfo) {
|
||||
URI uri = AdminService.saasCookiePath(uriInfo).build();
|
||||
String cookiePath = uri.getRawPath();
|
||||
|
@ -163,7 +166,7 @@ public class AuthenticationManager {
|
|||
|
||||
String tokenString = cookie.getValue();
|
||||
try {
|
||||
SkeletonKeyToken token = RSATokenVerifier.verifyToken(tokenString, realm.getPublicKey(), realm.getId());
|
||||
SkeletonKeyToken token = RSATokenVerifier.verifyToken(tokenString, realm.getPublicKey(), realm.getName());
|
||||
if (!token.isActive()) {
|
||||
logger.debug("identity cookie expired");
|
||||
expireIdentityCookie(realm, uriInfo);
|
||||
|
@ -212,7 +215,7 @@ public class AuthenticationManager {
|
|||
|
||||
|
||||
try {
|
||||
SkeletonKeyToken token = RSATokenVerifier.verifyToken(tokenString, realm.getPublicKey(), realm.getId());
|
||||
SkeletonKeyToken token = RSATokenVerifier.verifyToken(tokenString, realm.getPublicKey(), realm.getName());
|
||||
if (!token.isActive()) {
|
||||
throw new NotAuthorizedException("token_expired");
|
||||
}
|
||||
|
|
|
@ -85,12 +85,12 @@ public class OAuthClientManager {
|
|||
|
||||
public BaseAdapterConfig toInstallationRepresentation(RealmModel realmModel, OAuthClientModel model, URI baseUri) {
|
||||
BaseAdapterConfig rep = new BaseAdapterConfig();
|
||||
rep.setRealm(realmModel.getId());
|
||||
rep.setRealm(realmModel.getName());
|
||||
rep.setRealmKey(realmModel.getPublicKeyPem());
|
||||
rep.setSslNotRequired(realmModel.isSslNotRequired());
|
||||
|
||||
rep.setAuthUrl(Urls.realmLoginPage(baseUri, realmModel.getId()).toString());
|
||||
rep.setCodeUrl(Urls.realmCode(baseUri, realmModel.getId()).toString());
|
||||
rep.setAuthUrl(Urls.realmLoginPage(baseUri, realmModel.getName()).toString());
|
||||
rep.setCodeUrl(Urls.realmCode(baseUri, realmModel.getName()).toString());
|
||||
rep.setUseResourceRoleMappings(false);
|
||||
|
||||
rep.setResource(model.getOAuthAgent().getLoginName());
|
||||
|
|
|
@ -64,11 +64,16 @@ public class RealmManager {
|
|||
return identitySession.getRealm(id);
|
||||
}
|
||||
|
||||
public RealmModel getRealmByName(String name) {
|
||||
return identitySession.getRealmByName(name);
|
||||
}
|
||||
|
||||
public RealmModel createRealm(String name) {
|
||||
return createRealm(name, name);
|
||||
}
|
||||
|
||||
public RealmModel createRealm(String id, String name) {
|
||||
if (id == null) id = generateId();
|
||||
RealmModel realm = identitySession.createRealm(id, name);
|
||||
realm.setName(name);
|
||||
realm.addRole(Constants.APPLICATION_ROLE);
|
||||
|
@ -88,7 +93,10 @@ public class RealmManager {
|
|||
}
|
||||
|
||||
public void updateRealm(RealmRepresentation rep, RealmModel realm) {
|
||||
if (rep.getRealm() != null) realm.setName(rep.getRealm());
|
||||
if (rep.getRealm() != null) {
|
||||
logger.info("Updating realm name to " + rep.getRealm());
|
||||
realm.setName(rep.getRealm());
|
||||
}
|
||||
if (rep.isEnabled() != null) realm.setEnabled(rep.isEnabled());
|
||||
if (rep.isSocial() != null) realm.setSocial(rep.isSocial());
|
||||
if (rep.isCookieLoginAllowed() != null) realm.setCookieLoginAllowed(rep.isCookieLoginAllowed());
|
||||
|
@ -164,8 +172,11 @@ public class RealmManager {
|
|||
}
|
||||
|
||||
public RealmModel importRealm(RealmRepresentation rep, UserModel realmCreator) {
|
||||
//verifyRealmRepresentation(rep);
|
||||
RealmModel realm = createRealm(rep.getRealm());
|
||||
String id = rep.getId();
|
||||
if (id == null) {
|
||||
id = generateId();
|
||||
}
|
||||
RealmModel realm = createRealm(id, rep.getRealm());
|
||||
importRealm(rep, realm);
|
||||
return realm;
|
||||
}
|
||||
|
|
|
@ -4,13 +4,12 @@ import org.jboss.resteasy.client.jaxrs.ResteasyClient;
|
|||
import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder;
|
||||
import org.jboss.resteasy.logging.Logger;
|
||||
import org.keycloak.TokenIdGenerator;
|
||||
import org.keycloak.adapters.AdapterAdminResourceConstants;
|
||||
import org.keycloak.adapters.AdapterConstants;
|
||||
import org.keycloak.models.ApplicationModel;
|
||||
import org.keycloak.models.RealmModel;
|
||||
import org.keycloak.representations.adapters.action.LogoutAction;
|
||||
|
||||
import javax.ws.rs.client.Entity;
|
||||
import javax.ws.rs.core.Form;
|
||||
import javax.ws.rs.core.Response;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -43,7 +42,7 @@ public class ResourceAdminManager {
|
|||
LogoutAction adminAction = new LogoutAction(TokenIdGenerator.generateId(), System.currentTimeMillis() / 1000 + 30, resource.getName(), user);
|
||||
String token = new TokenManager().encodeToken(realm, adminAction);
|
||||
logger.debug("logout user: {0} resource: {1} url: {2}", user, resource.getName(), managementUrl);
|
||||
Response response = client.target(managementUrl).path(AdapterAdminResourceConstants.LOGOUT).request().post(Entity.text(token));
|
||||
Response response = client.target(managementUrl).path(AdapterConstants.K_LOGOUT).request().post(Entity.text(token));
|
||||
boolean success = response.getStatus() == 204;
|
||||
response.close();
|
||||
return success;
|
||||
|
|
|
@ -174,7 +174,7 @@ public class TokenManager {
|
|||
token.id(RealmManager.generateId());
|
||||
token.issuedNow();
|
||||
token.principal(user.getLoginName());
|
||||
token.audience(realm.getId());
|
||||
token.audience(realm.getName());
|
||||
if (realm.getTokenLifespan() > 0) {
|
||||
token.expiration((System.currentTimeMillis() / 1000) + realm.getTokenLifespan());
|
||||
}
|
||||
|
|
|
@ -330,10 +330,10 @@ public class AccountService {
|
|||
throw new BadRequestException();
|
||||
}
|
||||
|
||||
URI accountUri = Urls.accountBase(uriInfo.getBaseUri()).path("/").build(realm.getId());
|
||||
URI accountUri = Urls.accountBase(uriInfo.getBaseUri()).path("/").build(realm.getName());
|
||||
URI redirectUri = path != null ? accountUri.resolve(path) : accountUri;
|
||||
|
||||
NewCookie cookie = authManager.createAccountIdentityCookie(realm, accessCode.getUser(), client, Urls.accountBase(uriInfo.getBaseUri()).build(realm.getId()));
|
||||
NewCookie cookie = authManager.createAccountIdentityCookie(realm, accessCode.getUser(), client, Urls.accountBase(uriInfo.getBaseUri()).build(realm.getName()));
|
||||
return Response.status(302).cookie(cookie).location(redirectUri).build();
|
||||
} finally {
|
||||
authManager.expireCookie(AbstractOAuthClient.OAUTH_TOKEN_REQUEST_STATE, uriInfo.getAbsolutePath().getRawPath());
|
||||
|
@ -344,7 +344,7 @@ public class AccountService {
|
|||
@GET
|
||||
public Response logout() {
|
||||
// TODO Should use single-sign out via TokenService
|
||||
URI baseUri = Urls.accountBase(uriInfo.getBaseUri()).build(realm.getId());
|
||||
URI baseUri = Urls.accountBase(uriInfo.getBaseUri()).build(realm.getName());
|
||||
authManager.expireIdentityCookie(realm, uriInfo);
|
||||
authManager.expireAccountIdentityCookie(baseUri);
|
||||
return Response.status(302).location(baseUri).build();
|
||||
|
@ -352,12 +352,12 @@ public class AccountService {
|
|||
|
||||
private Response login(String path) {
|
||||
JaxrsOAuthClient oauth = new JaxrsOAuthClient();
|
||||
String authUrl = Urls.realmLoginPage(uriInfo.getBaseUri(), realm.getId()).toString();
|
||||
String authUrl = Urls.realmLoginPage(uriInfo.getBaseUri(), realm.getName()).toString();
|
||||
oauth.setAuthUrl(authUrl);
|
||||
|
||||
oauth.setClientId(Constants.ACCOUNT_APPLICATION);
|
||||
|
||||
URI accountUri = Urls.accountPageBuilder(uriInfo.getBaseUri()).path(AccountService.class, "loginRedirect").build(realm.getId());
|
||||
URI accountUri = Urls.accountPageBuilder(uriInfo.getBaseUri()).path(AccountService.class, "loginRedirect").build(realm.getName());
|
||||
|
||||
String referrer = getReferrer();
|
||||
if (referrer != null) {
|
||||
|
|
|
@ -7,6 +7,7 @@ import org.keycloak.models.ModelProvider;
|
|||
import org.keycloak.services.managers.ApplianceBootstrap;
|
||||
import org.keycloak.services.managers.SocialRequestManager;
|
||||
import org.keycloak.services.managers.TokenManager;
|
||||
import org.keycloak.services.resources.admin.AdminService;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
import javax.ws.rs.core.Application;
|
||||
|
|
|
@ -50,10 +50,10 @@ public class PublicRealmResource {
|
|||
public String getRealmHtml(@PathParam("realm") String id) {
|
||||
StringBuffer html = new StringBuffer();
|
||||
|
||||
String authUri = TokenService.loginPageUrl(uriInfo).build(realm.getId()).toString();
|
||||
String codeUri = TokenService.accessCodeToTokenUrl(uriInfo).build(realm.getId()).toString();
|
||||
String grantUrl = TokenService.grantAccessTokenUrl(uriInfo).build(realm.getId()).toString();
|
||||
String idGrantUrl = TokenService.grantIdentityTokenUrl(uriInfo).build(realm.getId()).toString();
|
||||
String authUri = TokenService.loginPageUrl(uriInfo).build(realm.getName()).toString();
|
||||
String codeUri = TokenService.accessCodeToTokenUrl(uriInfo).build(realm.getName()).toString();
|
||||
String grantUrl = TokenService.grantAccessTokenUrl(uriInfo).build(realm.getName()).toString();
|
||||
String idGrantUrl = TokenService.grantIdentityTokenUrl(uriInfo).build(realm.getName()).toString();
|
||||
|
||||
html.append("<html><body><h1>Realm: ").append(realm.getName()).append("</h1>");
|
||||
html.append("<p>auth: ").append(authUri).append("</p>");
|
||||
|
@ -74,10 +74,10 @@ public class PublicRealmResource {
|
|||
rep.setPublicKeyPem(realm.getPublicKeyPem());
|
||||
rep.setAdminRole(ADMIN_ROLE);
|
||||
|
||||
rep.setAuthorizationUrl(TokenService.loginPageUrl(uriInfo).build(realm.getId()).toString());
|
||||
rep.setCodeUrl(TokenService.accessCodeToTokenUrl(uriInfo).build(realm.getId()).toString());
|
||||
rep.setGrantUrl(TokenService.grantAccessTokenUrl(uriInfo).build(realm.getId()).toString());
|
||||
String idGrantUrl = TokenService.grantIdentityTokenUrl(uriInfo).build(realm.getId()).toString();
|
||||
rep.setAuthorizationUrl(TokenService.loginPageUrl(uriInfo).build(realm.getName()).toString());
|
||||
rep.setCodeUrl(TokenService.accessCodeToTokenUrl(uriInfo).build(realm.getName()).toString());
|
||||
rep.setGrantUrl(TokenService.grantAccessTokenUrl(uriInfo).build(realm.getName()).toString());
|
||||
String idGrantUrl = TokenService.grantIdentityTokenUrl(uriInfo).build(realm.getName()).toString();
|
||||
rep.setIdentityGrantUrl(idGrantUrl);
|
||||
return rep;
|
||||
}
|
||||
|
|
|
@ -48,26 +48,26 @@ public class RealmsResource {
|
|||
}
|
||||
|
||||
@Path("{realm}/tokens")
|
||||
public TokenService getTokenService(final @PathParam("realm") String id) {
|
||||
public TokenService getTokenService(final @PathParam("realm") String name) {
|
||||
RealmManager realmManager = new RealmManager(session);
|
||||
RealmModel realm = realmManager.getRealm(id);
|
||||
if (realm == null) {
|
||||
logger.debug("realm not found");
|
||||
throw new NotFoundException();
|
||||
}
|
||||
RealmModel realm = locateRealm(name, realmManager);
|
||||
TokenService tokenService = new TokenService(realm, tokenManager);
|
||||
resourceContext.initResource(tokenService);
|
||||
return tokenService;
|
||||
}
|
||||
|
||||
@Path("{realm}/account")
|
||||
public AccountService getAccountService(final @PathParam("realm") String id) {
|
||||
RealmManager realmManager = new RealmManager(session);
|
||||
RealmModel realm = realmManager.getRealm(id);
|
||||
protected RealmModel locateRealm(String name, RealmManager realmManager) {
|
||||
RealmModel realm = realmManager.getRealmByName(name);
|
||||
if (realm == null) {
|
||||
logger.debug("realm not found");
|
||||
throw new NotFoundException();
|
||||
throw new NotFoundException("Realm " + name + " not found");
|
||||
}
|
||||
return realm;
|
||||
}
|
||||
|
||||
@Path("{realm}/account")
|
||||
public AccountService getAccountService(final @PathParam("realm") String name) {
|
||||
RealmManager realmManager = new RealmManager(session);
|
||||
RealmModel realm = locateRealm(name, realmManager);
|
||||
|
||||
ApplicationModel application = realm.getApplicationNameMap().get(Constants.ACCOUNT_APPLICATION);
|
||||
if (application == null || !application.isEnabled()) {
|
||||
|
@ -81,13 +81,9 @@ public class RealmsResource {
|
|||
}
|
||||
|
||||
@Path("{realm}")
|
||||
public PublicRealmResource getRealmResource(final @PathParam("realm") String id) {
|
||||
public PublicRealmResource getRealmResource(final @PathParam("realm") String name) {
|
||||
RealmManager realmManager = new RealmManager(session);
|
||||
RealmModel realm = realmManager.getRealm(id);
|
||||
if (realm == null) {
|
||||
logger.debug("realm not found");
|
||||
throw new NotFoundException();
|
||||
}
|
||||
RealmModel realm = locateRealm(name, realmManager);
|
||||
PublicRealmResource realmResource = new PublicRealmResource(realm);
|
||||
resourceContext.initResource(realmResource);
|
||||
return realmResource;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package org.keycloak.services.resources;
|
||||
package org.keycloak.services.resources.admin;
|
||||
|
||||
import org.jboss.resteasy.annotations.cache.NoCache;
|
||||
import org.jboss.resteasy.logging.Logger;
|
||||
|
@ -21,7 +21,7 @@ import org.keycloak.services.managers.AuthenticationManager.AuthenticationStatus
|
|||
import org.keycloak.services.managers.RealmManager;
|
||||
import org.keycloak.services.managers.TokenManager;
|
||||
import org.keycloak.services.messages.Messages;
|
||||
import org.keycloak.services.resources.admin.RealmsAdminResource;
|
||||
import org.keycloak.services.resources.TokenService;
|
||||
import org.keycloak.services.resources.flows.Flows;
|
||||
import org.keycloak.services.resources.flows.OAuthFlows;
|
||||
|
|
@ -10,7 +10,6 @@ import org.keycloak.models.RealmModel;
|
|||
import org.keycloak.models.UserModel;
|
||||
import org.keycloak.representations.idm.RealmRepresentation;
|
||||
import org.keycloak.services.managers.RealmManager;
|
||||
import org.keycloak.services.resources.AdminService;
|
||||
import org.keycloak.services.resources.flows.Flows;
|
||||
|
||||
import javax.ws.rs.*;
|
||||
|
@ -78,12 +77,12 @@ public class RealmsAdminResource {
|
|||
public Response importRealm(@Context final UriInfo uriInfo, final RealmRepresentation rep) {
|
||||
logger.debug("importRealm: {0}", rep.getRealm());
|
||||
RealmManager realmManager = new RealmManager(session);
|
||||
if (realmManager.getRealm(rep.getRealm()) != null) {
|
||||
if (realmManager.getRealmByName(rep.getRealm()) != null) {
|
||||
return Flows.errors().exists("Realm " + rep.getRealm() + " already exists");
|
||||
}
|
||||
|
||||
RealmModel realm = realmManager.importRealm(rep, admin);
|
||||
URI location = realmUrl(uriInfo).build(realm.getId());
|
||||
URI location = realmUrl(uriInfo).build(realm.getName());
|
||||
logger.debug("imported realm success, sending back: {0}", location.toString());
|
||||
return Response.created(location).build();
|
||||
}
|
||||
|
@ -103,12 +102,12 @@ public class RealmsAdminResource {
|
|||
return Response.noContent().build();
|
||||
}
|
||||
|
||||
@Path("{id}")
|
||||
@Path("{realm}")
|
||||
public RealmAdminResource getRealmAdmin(@Context final HttpHeaders headers,
|
||||
@PathParam("id") final String id) {
|
||||
@PathParam("realm") final String name) {
|
||||
RealmManager realmManager = new RealmManager(session);
|
||||
RealmModel realm = realmManager.getRealm(id);
|
||||
if (realm == null) throw new NotFoundException();
|
||||
RealmModel realm = realmManager.getRealmByName(name);
|
||||
if (realm == null) throw new NotFoundException("{realm} = " + name);
|
||||
|
||||
RealmAdminResource adminResource = new RealmAdminResource(admin, realm);
|
||||
resourceContext.initResource(adminResource);
|
||||
|
|
|
@ -126,7 +126,7 @@ public class OAuthFlows {
|
|||
request.setAttribute("realmRolesRequested", accessCode.getRealmRolesRequested());
|
||||
request.setAttribute("resourceRolesRequested", accessCode.getResourceRolesRequested());
|
||||
request.setAttribute("client", client);
|
||||
request.setAttribute("action", TokenService.processOAuthUrl(uriInfo).build(realm.getId()).toString());
|
||||
request.setAttribute("action", TokenService.processOAuthUrl(uriInfo).build(realm.getName()).toString());
|
||||
request.setAttribute("code", accessCode.getCode());
|
||||
|
||||
return Flows.forms(realm, request, uriInfo).setAccessCode(accessCode).forwardToOAuthGrant();
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
package org.keycloak.services.resources.flows;
|
||||
|
||||
import org.keycloak.services.resources.AccountService;
|
||||
import org.keycloak.services.resources.AdminService;
|
||||
import org.keycloak.services.resources.admin.AdminService;
|
||||
import org.keycloak.services.resources.RealmsResource;
|
||||
import org.keycloak.services.resources.RequiredActionsService;
|
||||
import org.keycloak.services.resources.SocialResource;
|
||||
|
|
Loading…
Reference in a new issue