Merge pull request #319 from stianst/master

Update admin console to allow changing context-path for KC
This commit is contained in:
Stian Thorgersen 2014-04-07 11:21:48 +01:00
commit 323e032287
108 changed files with 99 additions and 336 deletions

View file

@ -1,32 +0,0 @@
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-beta-1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>keycloak-admin-ui-styles</artifactId>
<name>Keycloak Admin UI Styles</name>
<description />
<dependencies>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
</plugins>
</build>
</project>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 KiB

File diff suppressed because one or more lines are too long

View file

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-fragment version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd ">
</web-fragment>

View file

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View file

@ -5,15 +5,15 @@
<meta charset="utf-8">
<title>Keycloak Admin Console</title>
<link rel="icon" href="/auth/admin-ui/img/favicon.ico">
<link rel="icon" href="img/favicon.ico">
<!-- Frameworks -->
<link rel="stylesheet" href="/auth/admin-ui/patternfly/css/patternfly.css">
<link rel="stylesheet" href="lib/patternfly/css/patternfly.css">
<!-- Page styles -->
<link rel="stylesheet" href="/auth/admin-ui/css/admin-console.css">
<link rel="stylesheet" href="/auth/admin-ui/css/tables.css">
<link rel="stylesheet" href="/auth/admin-ui/css/sprites.css">
<link rel="stylesheet" href="css/admin-console.css">
<link rel="stylesheet" href="css/tables.css">
<link rel="stylesheet" href="css/sprites.css">
<link href="lib/select2-3.4.1/select2.css" rel="stylesheet">
<script src="lib/jquery/jquery-1.10.2.js" type="text/javascript"></script>
@ -29,13 +29,13 @@
<script src="lib/angular/select2.js" type="text/javascript"></script>
<script src="lib/fileupload/angular-file-upload.min.js"></script>
<script src="js/app.js"></script>
<script src="js/controllers/realm.js"></script>
<script src="js/controllers/applications.js"></script>
<script src="js/controllers/oauth-clients.js"></script>
<script src="js/controllers/users.js"></script>
<script src="js/loaders.js"></script>
<script src="js/services.js"></script>
<script src="js/app.js" type="text/javascript"></script>
<script src="js/controllers/realm.js" type="text/javascript"></script>
<script src="js/controllers/applications.js" type="text/javascript"></script>
<script src="js/controllers/oauth-clients.js" type="text/javascript"></script>
<script src="js/controllers/users.js" type="text/javascript"></script>
<script src="js/loaders.js" type="text/javascript"></script>
<script src="js/services.js" type="text/javascript"></script>
<style>
[ng\:cloak], [ng-cloak], .ng-cloak {
@ -83,12 +83,12 @@
$.idleTimeout('#idletimeout', '#idletimeout a', {
idleAfter: 300,
pollingInterval: 60,
keepAliveURL: '/auth/rest/admin/keepalive',
keepAliveURL: authUrl + '/rest/admin/keepalive',
serverResponseEquals: '',
failedRequests: 1,
onTimeout: function(){
$(this).slideUp();
window.location = "/auth/rest/admin/logout";
window.location = authUrl + '/rest/admin/logout';
},
onIdle: function(){
$(this).slideDown(); // show the warning bar

View file

@ -1,192 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<style>
.mock_view {
padding: 2em 2em;
}
</style>
<meta charset="utf-8">
<title>Keycloak Admin Console</title>
<link rel="icon" href="/auth/admin-ui/img/favicon.ico">
<!-- Frameworks -->
<!--link rel="stylesheet" href="/auth/admin-ui/bootstrap/css/bootstrap.css"-->
<link rel="stylesheet" href="/auth/admin-ui/patternfly/css/patternfly.css">
<!-- Page styles -->
<link rel="stylesheet" href="/auth/admin-ui/css/admin-console.css">
<link href="lib/select2-3.4.1/select2.css" rel="stylesheet">
<script src="lib/jquery/jquery-1.10.2.js" type="text/javascript"></script>
<script src="lib/select2-3.4.1/select2.js" type="text/javascript"></script>
<script src="lib/angular/angular.js"></script>
<script src="lib/angular/angular-resource.js"></script>
<script src="lib/angular/ui-bootstrap-tpls-0.4.0.js"></script>
<script src="lib/jquery/jquery.idletimer.js" type="text/javascript"></script>
<script src="lib/jquery/jquery.idletimeout.js" type="text/javascript"></script>
<script src="lib/angular/select2.js" type="text/javascript"></script>
<script src="lib/fileupload/angular-file-upload.min.js"></script> <!--
<script src="/auth/admin-ui/bootstrap-3.0.0-wip/js/dropdown.js"></script>
<script src="/auth/admin-ui/bootstrap-3.0.0-wip/js/tooltip.js"></script>
-->
<script src="/auth/admin-ui/js/bootstrap-tokenfield.js"></script>
<script src="/auth/admin-ui/bootstrap/js/bootstrap.js"></script>
<script src="js/app.js"></script>
<script src="js/controllers/realm.js"></script>
<script src="js/controllers/applications.js"></script>
<script src="js/controllers/oauth-clients.js"></script>
<script src="js/controllers/users.js"></script>
<script src="js/loaders.js"></script>
<script src="js/services.js"></script>
<style>
[ng\:cloak], [ng-cloak], .ng-cloak {
display: none !important;
}
</style>
</head>
<body class="admin-console" data-ng-controller="GlobalCtrl" ng-cloak>
<div id="idletimeout">
You will be logged off in <strong><span></span> seconds</strong> due to inactivity.
<a id="idletimeout-resume" href="#">Click here to continue using this web page</a>.
</div>
<div class="feedback-aligner" data-ng-show="notification" data-ng-click="notification = null">
<div class="alert alert-{{notification.type}}"><strong>{{notification.header}}</strong> {{notification.message}}</div>
</div>
<header class="navbar navbar-default navbar-pf navbar-main header">
<nav id="kc-navigation" class="navbar" role="navigation">
<div class="navbar-header">
<div class="container">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<h1 class="navbar-title"><Strong>KeyCloak</Strong> Central Login</h1>
</div>
</div>
<div class="collapse navbar-collapse navbar-collapse-1">
<div class="container">
<ul class="nav navbar-nav navbar-utility" data-ng-show="auth.loggedIn">
<li class="dropdown">
<a data-toggle="dropdown" class="dropdown-toggle" href="#">
<span class="pficon pficon-user"></span>
{{auth.user.displayName}}<b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li><a href="/auth/rest/realms/keycloak-admin/account?referrer=admin-console">Manage Account</a></li>
<li class="separator"><a href="/auth/rest/admin/logout">Sign Out</a></li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-primary persistent-secondary" data-ng-controller="RealmDropdownCtrl">
<li class="dropdown context" data-ng-show="showNav()">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Realm: {{current.realm.id}}
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li data-ng-repeat="realm in current.realms">
<a href="" ng-click="changeRealm(realm.id)" >{{realm.id}}</a>
</li>
</ul>
</li>
<!--------------------------------------->
<li class="active">
<a href="#">Settings</a>
<ul class="nav navbar-nav navbar-persistent">
<li class="active">
<a href="#">General</a>
</li>
<li>
<a href="#">Roles</a>
</li>
<li>
<a href="#">Default Roles</a>
</li>
<li>
<a href="#">Credentials</a>
</li>
<li>
<a href="#">Token</a>
</li>
<li>
<a href="#">Keys</a>
</li>
<li>
<a href="#">Email</a>
</li>
</ul>
</li>
<li>
<a href="#">User</a>
</li>
<li>
<a href="#">Applications</a>
</li>
<li>
<a href="#">OAuth Clients</a>
</li>
<!--------------------------------------->
<li class="active pull-right" data-ng-show="auth.loggedIn">
<a class="button primary" href="#/create/realm" data-ng-class="path[0] == 'create' && path[1] == 'realm' && 'active'"
data-ng-show="auth.loggedIn">Add Realm</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
<div class="container">
<div class="mock_view" data-ng-view id="view"></div>
<div id="loading" class="loading-backdrop">
<div class="loading">
<span>Loading...</span>
</div>
</div>
</div>
<script type="text/javascript">
$.idleTimeout('#idletimeout', '#idletimeout a', {
idleAfter: 300,
pollingInterval: 60,
keepAliveURL: '/auth/rest/admin/keepalive',
serverResponseEquals: '',
failedRequests: 1,
onTimeout: function(){
$(this).slideUp();
window.location = "/auth/rest/admin/logout";
},
onIdle: function(){
$(this).slideDown(); // show the warning bar
},
onCountdown: function( counter ){
$(this).find("span").html( counter ); // update the counter
},
onResume: function(){
$(this).slideUp(); // hide the warning bar
}
});
</script>
</body>
</html>

View file

@ -1,11 +1,14 @@
'use strict';
var authUrl = window.location.href;
authUrl = authUrl.substring(0, authUrl.indexOf('/admin/'));
var module = angular.module('keycloak', [ 'keycloak.services', 'keycloak.loaders', 'ui.bootstrap', 'ui.select2', 'angularFileUpload' ]);
var resourceRequests = 0;
var loadingTimer = -1;
angular.element(document).ready(function ($http) {
$http.get('/auth/rest/admin/whoami').success(function(data) {
$http.get(authUrl + '/rest/admin/whoami').success(function(data) {
var auth = {};
auth.user = data;
auth.loggedIn = true;
@ -16,7 +19,7 @@ angular.element(document).ready(function ($http) {
angular.bootstrap(document, ["keycloak"]);
}).error(function() {
var path = window.location.hash && window.location.hash.substring(1) || '/';
window.location = '/auth/rest/admin/login?path=' + path;
window.location = authUrl + '/rest/admin/login?path=' + path;
});
});
@ -666,7 +669,7 @@ module.factory('errorInterceptor', function($q, $window, $rootScope, $location,
if (response.status == 401) {
console.log('session timeout?');
Auth.loggedIn = false;
window.location = '/auth/rest/admin/login?path=' + $location.path();
window.location = authUrl + '/rest/admin/login?path=' + $location.path();
} else if (response.status == 403) {
Notifications.error("Forbidden");
} else if (response.status == 404) {

View file

@ -361,7 +361,7 @@ module.controller('ApplicationScopeMappingCtrl', function($scope, $http, realm,
});
$scope.addRealmRole = function() {
$http.post('/auth/rest/admin/realms/' + realm.realm + '/applications/' + application.name + '/scope-mappings/realm',
$http.post(authUrl + '/rest/admin/realms/' + realm.realm + '/applications/' + application.name + '/scope-mappings/realm',
$scope.selectedRealmRoles).success(function() {
for (var i = 0; i < $scope.selectedRealmRoles.length; i++) {
var role = $scope.selectedRealmRoles[i];
@ -376,7 +376,7 @@ module.controller('ApplicationScopeMappingCtrl', function($scope, $http, realm,
};
$scope.deleteRealmRole = function() {
$http.delete('/auth/rest/admin/realms/' + realm.realm + '/applications/' + application.name + '/scope-mappings/realm',
$http.delete(authUrl + '/rest/admin/realms/' + realm.realm + '/applications/' + application.name + '/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];
@ -391,7 +391,7 @@ module.controller('ApplicationScopeMappingCtrl', function($scope, $http, realm,
};
$scope.addApplicationRole = function() {
$http.post('/auth/rest/admin/realms/' + realm.realm + '/applications/' + application.name + '/scope-mappings/applications/' + $scope.targetApp.name,
$http.post(authUrl + '/rest/admin/realms/' + realm.realm + '/applications/' + application.name + '/scope-mappings/applications/' + $scope.targetApp.name,
$scope.selectedApplicationRoles).success(function() {
for (var i = 0; i < $scope.selectedApplicationRoles.length; i++) {
var role = $scope.selectedApplicationRoles[i];
@ -406,7 +406,7 @@ module.controller('ApplicationScopeMappingCtrl', function($scope, $http, realm,
};
$scope.deleteApplicationRole = function() {
$http.delete('/auth/rest/admin/realms/' + realm.realm + '/applications/' + application.name + '/scope-mappings/applications/' + $scope.targetApp.name,
$http.delete(authUrl + '/rest/admin/realms/' + realm.realm + '/applications/' + application.name + '/scope-mappings/applications/' + $scope.targetApp.name,
{data : $scope.selectedApplicationMappings, headers : {"content-type" : "application/json"}}).success(function() {
for (var i = 0; i < $scope.selectedApplicationMappings.length; i++) {
var role = $scope.selectedApplicationMappings[i];

View file

@ -211,7 +211,7 @@ module.controller('OAuthClientScopeMappingCtrl', function($scope, $http, realm,
});
$scope.addRealmRole = function() {
$http.post('/auth/rest/admin/realms/' + realm.realm + '/oauth-clients/' + oauth.id + '/scope-mappings/realm',
$http.post(authUrl + '/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];
@ -226,7 +226,7 @@ module.controller('OAuthClientScopeMappingCtrl', function($scope, $http, realm,
};
$scope.deleteRealmRole = function() {
$http.delete('/auth/rest/admin/realms/' + realm.realm + '/oauth-clients/' + oauth.id + '/scope-mappings/realm',
$http.delete(authUrl + '/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];
@ -241,7 +241,7 @@ module.controller('OAuthClientScopeMappingCtrl', function($scope, $http, realm,
};
$scope.addApplicationRole = function() {
$http.post('/auth/rest/admin/realms/' + realm.realm + '/oauth-clients/' + oauth.id + '/scope-mappings/applications/' + $scope.targetApp.name,
$http.post(authUrl + '/rest/admin/realms/' + realm.realm + '/oauth-clients/' + oauth.id + '/scope-mappings/applications/' + $scope.targetApp.name,
$scope.selectedApplicationRoles).success(function() {
for (var i = 0; i < $scope.selectedApplicationRoles.length; i++) {
var role = $scope.selectedApplicationRoles[i];
@ -256,7 +256,7 @@ module.controller('OAuthClientScopeMappingCtrl', function($scope, $http, realm,
};
$scope.deleteApplicationRole = function() {
$http.delete('/auth/rest/admin/realms/' + realm.realm + '/oauth-clients/' + oauth.id + '/scope-mappings/applications/' + $scope.targetApp.name,
$http.delete(authUrl + '/rest/admin/realms/' + realm.realm + '/oauth-clients/' + oauth.id + '/scope-mappings/applications/' + $scope.targetApp.name,
{data : $scope.selectedApplicationMappings, headers : {"content-type" : "application/json"}}).success(function() {
for (var i = 0; i < $scope.selectedApplicationMappings.length; i++) {
var role = $scope.selectedApplicationMappings[i];

View file

@ -3,8 +3,10 @@ module.controller('GlobalCtrl', function($scope, $http, Auth, Current, $location
Notifications.success("test");
};
$scope.authUrl = authUrl;
$scope.auth = Auth;
$http.get('/auth/rest/admin/whoami').success(function(data, status) {
$http.get(authUrl + '/rest/admin/whoami').success(function(data, status) {
Auth.user = data;
Auth.loggedIn = true;
@ -148,7 +150,7 @@ module.controller('RealmCreateCtrl', function($scope, Current, Realm, $upload, $
for (var i = 0; i < $scope.files.length; i++) {
var $file = $scope.files[i];
$scope.upload = $upload.upload({
url: '/auth/rest/admin/realms', //upload.php script, node.js route, or servlet url
url: authUrl + '/rest/admin/realms', //upload.php script, node.js route, or servlet url
// method: POST or PUT,
// headers: {'headerKey': 'headerValue'}, withCredential: true,
data: {myObj: ""},
@ -163,7 +165,7 @@ module.controller('RealmCreateCtrl', function($scope, Current, Realm, $upload, $
Realm.query(function(data) {
Current.realms = data;
$http.get('/auth/rest/admin/whoami').success(function(user) {
$http.get(authUrl + '/rest/admin/whoami').success(function(user) {
Auth.user = user;
Notifications.success("The realm has been uploaded.");
@ -200,7 +202,7 @@ module.controller('RealmCreateCtrl', function($scope, Current, Realm, $upload, $
Realm.query(function(data) {
Current.realms = data;
$http.get('/auth/rest/admin/whoami').success(function(user) {
$http.get(authUrl + '/rest/admin/whoami').success(function(user) {
Auth.user = user;
$location.url("/realms/" + realmCopy.realm);

View file

@ -28,7 +28,7 @@ module.controller('UserRoleMappingCtrl', function($scope, $http, realm, user, ro
});
$scope.addRealmRole = function() {
$http.post('/auth/rest/admin/realms/' + realm.realm + '/users/' + user.username + '/role-mappings/realm',
$http.post(authUrl + '/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];
@ -43,7 +43,7 @@ module.controller('UserRoleMappingCtrl', function($scope, $http, realm, user, ro
};
$scope.deleteRealmRole = function() {
$http.delete('/auth/rest/admin/realms/' + realm.realm + '/users/' + user.username + '/role-mappings/realm',
$http.delete(authUrl + '/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];
@ -58,7 +58,7 @@ module.controller('UserRoleMappingCtrl', function($scope, $http, realm, user, ro
};
$scope.addApplicationRole = function() {
$http.post('/auth/rest/admin/realms/' + realm.realm + '/users/' + user.username + '/role-mappings/applications/' + $scope.application.name,
$http.post(authUrl + '/rest/admin/realms/' + realm.realm + '/users/' + user.username + '/role-mappings/applications/' + $scope.application.name,
$scope.selectedApplicationRoles).success(function() {
for (var i = 0; i < $scope.selectedApplicationRoles.length; i++) {
var role = $scope.selectedApplicationRoles[i];
@ -73,7 +73,7 @@ module.controller('UserRoleMappingCtrl', function($scope, $http, realm, user, ro
};
$scope.deleteApplicationRole = function() {
$http.delete('/auth/rest/admin/realms/' + realm.realm + '/users/' + user.username + '/role-mappings/applications/' + $scope.application.name,
$http.delete(authUrl + '/rest/admin/realms/' + realm.realm + '/users/' + user.username + '/role-mappings/applications/' + $scope.application.name,
{data : $scope.selectedApplicationMappings, headers : {"content-type" : "application/json"}}).success(function() {
for (var i = 0; i < $scope.selectedApplicationMappings.length; i++) {
var role = $scope.selectedApplicationMappings[i];

View file

@ -128,7 +128,7 @@ module.factory('Notifications', function($rootScope, $timeout) {
});
module.factory('Realm', function($resource) {
return $resource('/auth/rest/admin/realms/:id', {
return $resource(authUrl + '/rest/admin/realms/:id', {
id : '@realm'
}, {
update : {
@ -143,17 +143,17 @@ module.factory('Realm', function($resource) {
});
module.factory('RealmAudit', function($resource) {
return $resource('/auth/rest/admin/realms/:id/audit', {
return $resource(authUrl + '/rest/admin/realms/:id/audit', {
id : '@realm'
});
});
module.factory('ServerInfo', function($resource) {
return $resource('/auth/rest/admin/serverinfo');
return $resource(authUrl + '/rest/admin/serverinfo');
});
module.factory('User', function($resource) {
return $resource('/auth/rest/admin/realms/:realm/users/:userId', {
return $resource(authUrl + '/rest/admin/realms/:realm/users/:userId', {
realm : '@realm',
userId : '@userId'
}, {
@ -164,13 +164,13 @@ module.factory('User', function($resource) {
});
module.factory('UserSessionStats', function($resource) {
return $resource('/auth/rest/admin/realms/:realm/users/:user/session-stats', {
return $resource(authUrl + '/rest/admin/realms/:realm/users/:user/session-stats', {
realm : '@realm',
user : '@user'
});
});
module.factory('UserLogout', function($resource) {
return $resource('/auth/rest/admin/realms/:realm/users/:user/logout', {
return $resource(authUrl + '/rest/admin/realms/:realm/users/:user/logout', {
realm : '@realm',
user : '@user'
});
@ -179,7 +179,7 @@ module.factory('UserLogout', function($resource) {
module.factory('UserCredentials', function($resource) {
var credentials = {};
credentials.resetPassword = $resource('/auth/rest/admin/realms/:realm/users/:userId/reset-password', {
credentials.resetPassword = $resource(authUrl + '/rest/admin/realms/:realm/users/:userId/reset-password', {
realm : '@realm',
userId : '@userId'
}, {
@ -188,7 +188,7 @@ module.factory('UserCredentials', function($resource) {
}
}).update;
credentials.removeTotp = $resource('/auth/rest/admin/realms/:realm/users/:userId/remove-totp', {
credentials.removeTotp = $resource(authUrl + '/rest/admin/realms/:realm/users/:userId/remove-totp', {
realm : '@realm',
userId : '@userId'
}, {
@ -197,7 +197,7 @@ module.factory('UserCredentials', function($resource) {
}
}).update;
credentials.resetPasswordEmail = $resource('/auth/rest/admin/realms/:realm/users/:userId/reset-password-email', {
credentials.resetPasswordEmail = $resource(authUrl + '/rest/admin/realms/:realm/users/:userId/reset-password-email', {
realm : '@realm',
userId : '@userId'
}, {
@ -210,14 +210,14 @@ module.factory('UserCredentials', function($resource) {
});
module.factory('RealmRoleMapping', function($resource) {
return $resource('/auth/rest/admin/realms/:realm/users/:userId/role-mappings/realm', {
return $resource(authUrl + '/rest/admin/realms/:realm/users/:userId/role-mappings/realm', {
realm : '@realm',
userId : '@userId'
});
});
module.factory('ApplicationRoleMapping', function($resource) {
return $resource('/auth/rest/admin/realms/:realm/users/:userId/role-mappings/applications/:application', {
return $resource(authUrl + '/rest/admin/realms/:realm/users/:userId/role-mappings/applications/:application', {
realm : '@realm',
userId : '@userId',
application : "@application"
@ -225,14 +225,14 @@ module.factory('ApplicationRoleMapping', function($resource) {
});
module.factory('ApplicationRealmScopeMapping', function($resource) {
return $resource('/auth/rest/admin/realms/:realm/applications/:application/scope-mappings/realm', {
return $resource(authUrl + '/rest/admin/realms/:realm/applications/:application/scope-mappings/realm', {
realm : '@realm',
application : '@application'
});
});
module.factory('ApplicationApplicationScopeMapping', function($resource) {
return $resource('/auth/rest/admin/realms/:realm/applications/:application/scope-mappings/applications/:targetApp', {
return $resource(authUrl + '/rest/admin/realms/:realm/applications/:application/scope-mappings/applications/:targetApp', {
realm : '@realm',
application : '@application',
targetApp : '@targetApp'
@ -242,33 +242,33 @@ module.factory('ApplicationApplicationScopeMapping', function($resource) {
module.factory('RealmRoles', function($resource) {
return $resource('/auth/rest/admin/realms/:realm/roles', {
return $resource(authUrl + '/rest/admin/realms/:realm/roles', {
realm : '@realm'
});
});
module.factory('RoleRealmComposites', function($resource) {
return $resource('/auth/rest/admin/realms/:realm/roles-by-id/:role/composites/realm', {
return $resource(authUrl + '/rest/admin/realms/:realm/roles-by-id/:role/composites/realm', {
realm : '@realm',
role : '@role'
});
});
module.factory('RealmPushRevocation', function($resource) {
return $resource('/auth/rest/admin/realms/:realm/push-revocation', {
return $resource(authUrl + '/rest/admin/realms/:realm/push-revocation', {
realm : '@realm'
});
});
module.factory('RealmSessionStats', function($resource) {
return $resource('/auth/rest/admin/realms/:realm/session-stats', {
return $resource(authUrl + '/rest/admin/realms/:realm/session-stats', {
realm : '@realm'
});
});
module.factory('RoleApplicationComposites', function($resource) {
return $resource('/auth/rest/admin/realms/:realm/roles-by-id/:role/composites/applications/:application', {
return $resource(authUrl + '/rest/admin/realms/:realm/roles-by-id/:role/composites/applications/:application', {
realm : '@realm',
role : '@role',
application : "@application"
@ -351,7 +351,7 @@ function roleControl($scope, realm, role, roles, applications,
$scope.addRealmRole = function() {
$scope.compositeSwitchDisabled=true;
$http.post('/auth/rest/admin/realms/' + realm.realm + '/roles-by-id/' + role.id + '/composites',
$http.post(authUrl + '/rest/admin/realms/' + realm.realm + '/roles-by-id/' + role.id + '/composites',
$scope.selectedRealmRoles).success(function() {
for (var i = 0; i < $scope.selectedRealmRoles.length; i++) {
var role = $scope.selectedRealmRoles[i];
@ -367,7 +367,7 @@ function roleControl($scope, realm, role, roles, applications,
$scope.deleteRealmRole = function() {
$scope.compositeSwitchDisabled=true;
$http.delete('/auth/rest/admin/realms/' + realm.realm + '/roles-by-id/' + role.id + '/composites',
$http.delete(authUrl + '/rest/admin/realms/' + realm.realm + '/roles-by-id/' + role.id + '/composites',
{data : $scope.selectedRealmMappings, headers : {"content-type" : "application/json"}}).success(function() {
for (var i = 0; i < $scope.selectedRealmMappings.length; i++) {
var role = $scope.selectedRealmMappings[i];
@ -383,7 +383,7 @@ function roleControl($scope, realm, role, roles, applications,
$scope.addApplicationRole = function() {
$scope.compositeSwitchDisabled=true;
$http.post('/auth/rest/admin/realms/' + realm.realm + '/roles-by-id/' + role.id + '/composites',
$http.post(authUrl + '/rest/admin/realms/' + realm.realm + '/roles-by-id/' + role.id + '/composites',
$scope.selectedApplicationRoles).success(function() {
for (var i = 0; i < $scope.selectedApplicationRoles.length; i++) {
var role = $scope.selectedApplicationRoles[i];
@ -399,7 +399,7 @@ function roleControl($scope, realm, role, roles, applications,
$scope.deleteApplicationRole = function() {
$scope.compositeSwitchDisabled=true;
$http.delete('/auth/rest/admin/realms/' + realm.realm + '/roles-by-id/' + role.id + '/composites',
$http.delete(authUrl + '/rest/admin/realms/' + realm.realm + '/roles-by-id/' + role.id + '/composites',
{data : $scope.selectedApplicationMappings, headers : {"content-type" : "application/json"}}).success(function() {
for (var i = 0; i < $scope.selectedApplicationMappings.length; i++) {
var role = $scope.selectedApplicationMappings[i];
@ -450,7 +450,7 @@ function roleControl($scope, realm, role, roles, applications,
module.factory('Role', function($resource) {
return $resource('/auth/rest/admin/realms/:realm/roles/:role', {
return $resource(authUrl + '/rest/admin/realms/:realm/roles/:role', {
realm : '@realm',
role : '@role'
}, {
@ -461,7 +461,7 @@ module.factory('Role', function($resource) {
});
module.factory('RoleById', function($resource) {
return $resource('/auth/rest/admin/realms/:realm/roles-by-id/:role', {
return $resource(authUrl + '/rest/admin/realms/:realm/roles-by-id/:role', {
realm : '@realm',
role : '@role'
}, {
@ -472,7 +472,7 @@ module.factory('RoleById', function($resource) {
});
module.factory('ApplicationRole', function($resource) {
return $resource('/auth/rest/admin/realms/:realm/applications/:application/roles/:role', {
return $resource(authUrl + '/rest/admin/realms/:realm/applications/:application/roles/:role', {
realm : '@realm',
application : "@application",
role : '@role'
@ -484,7 +484,7 @@ module.factory('ApplicationRole', function($resource) {
});
module.factory('ApplicationClaims', function($resource) {
return $resource('/auth/rest/admin/realms/:realm/applications/:application/claims', {
return $resource(authUrl + '/rest/admin/realms/:realm/applications/:application/claims', {
realm : '@realm',
application : "@application"
}, {
@ -495,40 +495,40 @@ module.factory('ApplicationClaims', function($resource) {
});
module.factory('ApplicationSessionStats', function($resource) {
return $resource('/auth/rest/admin/realms/:realm/applications/:application/session-stats', {
return $resource(authUrl + '/rest/admin/realms/:realm/applications/:application/session-stats', {
realm : '@realm',
application : "@application"
});
});
module.factory('ApplicationSessionStatsWithUsers', function($resource) {
return $resource('/auth/rest/admin/realms/:realm/applications/:application/session-stats?users=true', {
return $resource(authUrl + '/rest/admin/realms/:realm/applications/:application/session-stats?users=true', {
realm : '@realm',
application : "@application"
});
});
module.factory('ApplicationLogoutAll', function($resource) {
return $resource('/auth/rest/admin/realms/:realm/applications/:application/logout-all', {
return $resource(authUrl + '/rest/admin/realms/:realm/applications/:application/logout-all', {
realm : '@realm',
application : "@application"
});
});
module.factory('ApplicationLogoutUser', function($resource) {
return $resource('/auth/rest/admin/realms/:realm/applications/:application/logout-user/:user', {
return $resource(authUrl + '/rest/admin/realms/:realm/applications/:application/logout-user/:user', {
realm : '@realm',
application : "@application",
user : "@user"
});
});
module.factory('RealmLogoutAll', function($resource) {
return $resource('/auth/rest/admin/realms/:realm/logout-all', {
return $resource(authUrl + '/rest/admin/realms/:realm/logout-all', {
realm : '@realm'
});
});
module.factory('ApplicationPushRevocation', function($resource) {
return $resource('/auth/rest/admin/realms/:realm/applications/:application/push-revocation', {
return $resource(authUrl + '/rest/admin/realms/:realm/applications/:application/push-revocation', {
realm : '@realm',
application : "@application"
});
@ -537,7 +537,7 @@ module.factory('ApplicationPushRevocation', function($resource) {
module.factory('Application', function($resource) {
return $resource('/auth/rest/admin/realms/:realm/applications/:application', {
return $resource(authUrl + '/rest/admin/realms/:realm/applications/:application', {
realm : '@realm',
application : '@application'
}, {
@ -548,7 +548,7 @@ module.factory('Application', function($resource) {
});
module.factory('ApplicationInstallation', function($resource) {
var url = '/auth/rest/admin/realms/:realm/applications/:application/installation/json';
var url = authUrl + '/rest/admin/realms/:realm/applications/:application/installation/json';
return {
url : function(parameters)
{
@ -557,7 +557,7 @@ module.factory('ApplicationInstallation', function($resource) {
}
});
module.factory('ApplicationInstallationJBoss', function($resource) {
var url = '/auth/rest/admin/realms/:realm/applications/:application/installation/jboss';
var url = authUrl + '/rest/admin/realms/:realm/applications/:application/installation/jboss';
return {
url : function(parameters)
{
@ -567,7 +567,7 @@ module.factory('ApplicationInstallationJBoss', function($resource) {
});
module.factory('ApplicationCredentials', function($resource) {
return $resource('/auth/rest/admin/realms/:realm/applications/:application/client-secret', {
return $resource(authUrl + '/rest/admin/realms/:realm/applications/:application/client-secret', {
realm : '@realm',
application : '@application'
}, {
@ -578,7 +578,7 @@ module.factory('ApplicationCredentials', function($resource) {
});
module.factory('ApplicationOrigins', function($resource) {
return $resource('/auth/rest/admin/realms/:realm/applications/:application/allowed-origins', {
return $resource(authUrl + '/rest/admin/realms/:realm/applications/:application/allowed-origins', {
realm : '@realm',
application : '@application'
}, {
@ -590,7 +590,7 @@ module.factory('ApplicationOrigins', function($resource) {
});
module.factory('OAuthClient', function($resource) {
return $resource('/auth/rest/admin/realms/:realm/oauth-clients/:id', {
return $resource(authUrl + '/rest/admin/realms/:realm/oauth-clients/:id', {
realm : '@realm',
id : '@id'
}, {
@ -601,7 +601,7 @@ module.factory('OAuthClient', function($resource) {
});
module.factory('OAuthClientClaims', function($resource) {
return $resource('/auth/rest/admin/realms/:realm/oauth-clients/:oauth/claims', {
return $resource(authUrl + '/rest/admin/realms/:realm/oauth-clients/:oauth/claims', {
realm : '@realm',
oauth : "@oauth"
}, {
@ -613,7 +613,7 @@ module.factory('OAuthClientClaims', function($resource) {
module.factory('OAuthClientCredentials', function($resource) {
return $resource('/auth/rest/admin/realms/:realm/oauth-clients/:oauth/client-secret', {
return $resource(authUrl + '/rest/admin/realms/:realm/oauth-clients/:oauth/client-secret', {
realm : '@realm',
oauth : '@oauth'
}, {
@ -625,14 +625,14 @@ module.factory('OAuthClientCredentials', function($resource) {
});
module.factory('OAuthClientRealmScopeMapping', function($resource) {
return $resource('/auth/rest/admin/realms/:realm/oauth-clients/:oauth/scope-mappings/realm', {
return $resource(authUrl + '/rest/admin/realms/:realm/oauth-clients/:oauth/scope-mappings/realm', {
realm : '@realm',
oauth : '@oauth'
});
});
module.factory('OAuthClientApplicationScopeMapping', function($resource) {
return $resource('/auth/rest/admin/realms/:realm/oauth-clients/:oauth/scope-mappings/applications/:targetApp', {
return $resource(authUrl + '/rest/admin/realms/:realm/oauth-clients/:oauth/scope-mappings/applications/:targetApp', {
realm : '@realm',
oauth : '@oauth',
targetApp : '@targetApp'
@ -640,8 +640,8 @@ module.factory('OAuthClientApplicationScopeMapping', function($resource) {
});
module.factory('OAuthClientInstallation', function($resource) {
var url = '/auth/rest/admin/realms/:realm/oauth-clients/:oauth/installation';
var resource = $resource('/auth/rest/admin/realms/:realm/oauth-clients/:oauth/installation', {
var url = authUrl + '/rest/admin/realms/:realm/oauth-clients/:oauth/installation';
var resource = $resource(authUrl + '/rest/admin/realms/:realm/oauth-clients/:oauth/installation', {
realm : '@realm',
oauth : '@oauth'
}, {

File diff suppressed because one or more lines are too long

View file

@ -19,8 +19,8 @@
{{auth.user.displayName}}<b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li><a href="/auth/rest/realms/{{auth.user.realm}}/account?referrer=admin-console">Manage Account</a></li>
<li class="separator"><a href="/auth/rest/admin/logout">Sign Out</a></li>
<li><a href="{{authUrl}}/rest/realms/{{auth.user.realm}}/account?referrer=admin-console">Manage Account</a></li>
<li class="separator"><a href="{{authUrl}}/rest/admin/logout">Sign Out</a></li>
</ul>
</li>
</ul>

Some files were not shown because too many files have changed in this diff Show more