keycloak-memoizeit

change uri scheme

1/13/2014 8:07:36 PM

Changes

README.md 2(+1 -1)

Details

diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/index.html b/admin-ui/src/main/resources/META-INF/resources/admin/index.html
index 3ef1734..529fe85 100755
--- a/admin-ui/src/main/resources/META-INF/resources/admin/index.html
+++ b/admin-ui/src/main/resources/META-INF/resources/admin/index.html
@@ -5,24 +5,24 @@
     <meta charset="utf-8">
     <title>Keycloak</title>
 
-    <link rel="icon" href="/auth-server/admin-ui/img/favicon.ico">
+    <link rel="icon" href="/auth/admin-ui/img/favicon.ico">
 
     <!-- Frameworks -->
-    <link rel="stylesheet" href="/auth-server/admin-ui/css/reset.css">
-    <link rel="stylesheet" href="/auth-server/admin-ui/bootstrap-3.0.0-wip/css/bootstrap.css">
-    <link rel="stylesheet" href="/auth-server/admin-ui/css/sprites.css">
+    <link rel="stylesheet" href="/auth/admin-ui/css/reset.css">
+    <link rel="stylesheet" href="/auth/admin-ui/bootstrap-3.0.0-wip/css/bootstrap.css">
+    <link rel="stylesheet" href="/auth/admin-ui/css/sprites.css">
     <link rel="stylesheet" href='//fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic'>
 
     <!-- RCUE styles -->
-    <link rel="stylesheet" href="/auth-server/admin-ui/css/base.css">
-    <link rel="stylesheet" href="/auth-server/admin-ui/css/forms.css">
-    <link rel="stylesheet" href="/auth-server/admin-ui/css/header.css">
-    <link rel="stylesheet" href="/auth-server/admin-ui/css/tabs.css">
-    <link rel="stylesheet" href="/auth-server/admin-ui/css/icons.css">
-    <link rel="stylesheet" href="/auth-server/admin-ui/css/tables.css">
+    <link rel="stylesheet" href="/auth/admin-ui/css/base.css">
+    <link rel="stylesheet" href="/auth/admin-ui/css/forms.css">
+    <link rel="stylesheet" href="/auth/admin-ui/css/header.css">
+    <link rel="stylesheet" href="/auth/admin-ui/css/tabs.css">
+    <link rel="stylesheet" href="/auth/admin-ui/css/icons.css">
+    <link rel="stylesheet" href="/auth/admin-ui/css/tables.css">
 
     <!-- Page styles -->
-    <link rel="stylesheet" href="/auth-server/admin-ui/css/admin-console.css">
+    <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>
@@ -36,9 +36,9 @@
     <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-server/admin-ui/bootstrap-3.0.0-wip/js/dropdown.js"></script>
-    <script src="/auth-server/admin-ui/bootstrap-3.0.0-wip/js/tooltip.js"></script>
-    <script src="/auth-server/admin-ui/js/bootstrap-tokenfield.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="js/app.js"></script>
     <script src="js/controllers/realm.js"></script>
@@ -82,12 +82,12 @@
     $.idleTimeout('#idletimeout', '#idletimeout a', {
         idleAfter: 300,
         pollingInterval: 60,
-        keepAliveURL: '/auth-server/rest/saas/keepalive',
+        keepAliveURL: '/auth/rest/admin/keepalive',
         serverResponseEquals: '',
         failedRequests: 1,
         onTimeout: function(){
             $(this).slideUp();
-            window.location = "/auth-server/rest/saas/logout";
+            window.location = "/auth/rest/admin/logout";
         },
         onIdle: function(){
             $(this).slideDown(); // show the warning bar
diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/js/app.js b/admin-ui/src/main/resources/META-INF/resources/admin/js/app.js
index 25f7e36..701d4a0 100755
--- a/admin-ui/src/main/resources/META-INF/resources/admin/js/app.js
+++ b/admin-ui/src/main/resources/META-INF/resources/admin/js/app.js
@@ -5,7 +5,7 @@ var resourceRequests = 0;
 var loadingTimer = -1;
 
 angular.element(document).ready(function ($http) {
-    $http.get('/auth-server/rest/saas/whoami').success(function(data) {
+    $http.get('/auth/rest/admin/whoami').success(function(data) {
         var auth = {};
         auth.user = data;
         auth.loggedIn = true;
@@ -16,7 +16,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-server/rest/saas/login?path=' + path;
+        window.location = '/auth/rest/admin/login?path=' + path;
     });
 });
 
@@ -484,7 +484,7 @@ module.factory('errorInterceptor', function($q, $window, $rootScope, $location, 
             if (response.status == 401) {
                 console.log('session timeout?');
                 Auth.loggedIn = false;
-                window.location = '/auth-server/rest/saas/login?path=' + $location.path();
+                window.location = '/auth/rest/admin/login?path=' + $location.path();
             } else if (response.status == 404) {
                 Notifications.error("Not found");
             } else if (response.status) {
diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/applications.js b/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/applications.js
index 90c51d4..2338abe 100755
--- a/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/applications.js
+++ b/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/applications.js
@@ -309,7 +309,7 @@ module.controller('ApplicationScopeMappingCtrl', function($scope, $http, realm, 
     });
 
     $scope.addRealmRole = function() {
-        $http.post('/auth-server/rest/saas/admin/realms/' + realm.id + '/applications/' + application.id + '/scope-mappings/realm',
+        $http.post('/auth/rest/admin/realms/' + realm.id + '/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-server/rest/saas/admin/realms/' + realm.id + '/applications/' + application.id +  '/scope-mappings/realm',
+        $http.delete('/auth/rest/admin/realms/' + realm.id + '/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-server/rest/saas/admin/realms/' + realm.id + '/applications/' + application.id +  '/scope-mappings/applications/' + $scope.targetApp.id,
+        $http.post('/auth/rest/admin/realms/' + realm.id + '/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-server/rest/saas/admin/realms/' + realm.id + '/applications/' + application.id +  '/scope-mappings/applications/' + $scope.targetApp.id,
+        $http.delete('/auth/rest/admin/realms/' + realm.id + '/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];
diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/oauth-clients.js b/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/oauth-clients.js
index b13bc32..4c43c66 100755
--- a/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/oauth-clients.js
+++ b/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/oauth-clients.js
@@ -209,7 +209,7 @@ module.controller('OAuthClientScopeMappingCtrl', function($scope, $http, realm, 
     });
 
     $scope.addRealmRole = function() {
-        $http.post('/auth-server/rest/saas/admin/realms/' + realm.id + '/oauth-clients/' + oauth.id + '/scope-mappings/realm',
+        $http.post('/auth/rest/admin/realms/' + realm.id + '/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-server/rest/saas/admin/realms/' + realm.id + '/oauth-clients/' + oauth.id +  '/scope-mappings/realm',
+        $http.delete('/auth/rest/admin/realms/' + realm.id + '/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-server/rest/saas/admin/realms/' + realm.id + '/oauth-clients/' + oauth.id +  '/scope-mappings/applications/' + $scope.targetApp.id,
+        $http.post('/auth/rest/admin/realms/' + realm.id + '/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-server/rest/saas/admin/realms/' + realm.id + '/oauth-clients/' + oauth.id +  '/scope-mappings/applications/' + $scope.targetApp.id,
+        $http.delete('/auth/rest/admin/realms/' + realm.id + '/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];
diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/realm.js b/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/realm.js
index 2beafc3..72bd806 100755
--- a/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/realm.js
+++ b/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/realm.js
@@ -4,7 +4,7 @@ module.controller('GlobalCtrl', function($scope, $http, Auth, Current, $location
     };
 
     $scope.auth = Auth;
-    $http.get('/auth-server/rest/saas/whoami').success(function(data, status) {
+    $http.get('/auth/rest/admin/whoami').success(function(data, status) {
         Auth.user = data;
         Auth.loggedIn = true;
     })
@@ -87,7 +87,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-server/rest/saas/admin/realms', //upload.php script, node.js route, or servlet url
+                url: '/auth/rest/admin/realms', //upload.php script, node.js route, or servlet url
                 // method: POST or PUT,
                 // headers: {'headerKey': 'headerValue'}, withCredential: true,
                 data: {myObj: ""},
diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/users.js b/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/users.js
index eaf8040..6eb6986 100755
--- a/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/users.js
+++ b/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/users.js
@@ -30,7 +30,7 @@ module.controller('UserRoleMappingCtrl', function($scope, $http, realm, user, ro
     });
 
     $scope.addRealmRole = function() {
-        $http.post('/auth-server/rest/saas/admin/realms/' + realm.id + '/users/' + user.username + '/role-mappings/realm',
+        $http.post('/auth/rest/admin/realms/' + realm.id + '/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-server/rest/saas/admin/realms/' + realm.id + '/users/' + user.username + '/role-mappings/realm',
+        $http.delete('/auth/rest/admin/realms/' + realm.id + '/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-server/rest/saas/admin/realms/' + realm.id + '/users/' + user.username + '/role-mappings/applications/' + $scope.application.id,
+        $http.post('/auth/rest/admin/realms/' + realm.id + '/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-server/rest/saas/admin/realms/' + realm.id + '/users/' + user.username + '/role-mappings/applications/' + $scope.application.id,
+        $http.delete('/auth/rest/admin/realms/' + realm.id + '/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];
diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/js/services.js b/admin-ui/src/main/resources/META-INF/resources/admin/js/services.js
index 5bccc4c..5f1b3d8 100755
--- a/admin-ui/src/main/resources/META-INF/resources/admin/js/services.js
+++ b/admin-ui/src/main/resources/META-INF/resources/admin/js/services.js
@@ -106,7 +106,7 @@ module.factory('Notifications', function($rootScope, $timeout) {
 });
 
 module.factory('Realm', function($resource) {
-	return $resource('/auth-server/rest/saas/admin/realms/:id', {
+	return $resource('/auth/rest/admin/realms/:id', {
 		id : '@id'
 	}, {
 		update : {
@@ -116,7 +116,7 @@ module.factory('Realm', function($resource) {
 });
 
 module.factory('User', function($resource) {
-	return $resource('/auth-server/rest/saas/admin/realms/:realm/users/:userId', {
+	return $resource('/auth/rest/admin/realms/:realm/users/:userId', {
 		realm : '@realm',
 		userId : '@userId'
 	}, {
@@ -127,7 +127,7 @@ module.factory('User', function($resource) {
 });
 
 module.factory('UserCredentials', function($resource) {
-    return $resource('/auth-server/rest/saas/admin/realms/:realm/users/:userId/credentials', {
+    return $resource('/auth/rest/admin/realms/:realm/users/:userId/credentials', {
         realm : '@realm',
         userId : '@userId'
     }, {
@@ -139,14 +139,14 @@ module.factory('UserCredentials', function($resource) {
 });
 
 module.factory('RealmRoleMapping', function($resource) {
-    return $resource('/auth-server/rest/saas/admin/realms/:realm/users/:userId/role-mappings/realm', {
+    return $resource('/auth/rest/admin/realms/:realm/users/:userId/role-mappings/realm', {
         realm : '@realm',
         userId : '@userId'
     });
 });
 
 module.factory('ApplicationRoleMapping', function($resource) {
-    return $resource('/auth-server/rest/saas/admin/realms/:realm/users/:userId/role-mappings/applications/:application', {
+    return $resource('/auth/rest/admin/realms/:realm/users/:userId/role-mappings/applications/:application', {
         realm : '@realm',
         userId : '@userId',
         application : "@application"
@@ -154,14 +154,14 @@ module.factory('ApplicationRoleMapping', function($resource) {
 });
 
 module.factory('ApplicationRealmScopeMapping', function($resource) {
-    return $resource('/auth-server/rest/saas/admin/realms/:realm/applications/:application/scope-mappings/realm', {
+    return $resource('/auth/rest/admin/realms/:realm/applications/:application/scope-mappings/realm', {
         realm : '@realm',
         application : '@application'
     });
 });
 
 module.factory('ApplicationApplicationScopeMapping', function($resource) {
-    return $resource('/auth-server/rest/saas/admin/realms/:realm/applications/:application/scope-mappings/applications/:targetApp', {
+    return $resource('/auth/rest/admin/realms/:realm/applications/:application/scope-mappings/applications/:targetApp', {
         realm : '@realm',
         application : '@application',
         targetApp : '@targetApp'
@@ -171,7 +171,7 @@ module.factory('ApplicationApplicationScopeMapping', function($resource) {
 
 
 module.factory('RealmRoles', function($resource) {
-    return $resource('/auth-server/rest/saas/admin/realms/:realm/roles', {
+    return $resource('/auth/rest/admin/realms/:realm/roles', {
         realm : '@realm'
     });
 });
@@ -179,7 +179,7 @@ module.factory('RealmRoles', function($resource) {
 
 
 module.factory('Role', function($resource) {
-    return $resource('/auth-server/rest/saas/admin/realms/:realm/roles/:roleId', {
+    return $resource('/auth/rest/admin/realms/:realm/roles/:roleId', {
         realm : '@realm',
         roleId : '@roleId'
     },  {
@@ -190,7 +190,7 @@ module.factory('Role', function($resource) {
 });
 
 module.factory('ApplicationRole', function($resource) {
-    return $resource('/auth-server/rest/saas/admin/realms/:realm/applications/:application/roles/:roleId', {
+    return $resource('/auth/rest/admin/realms/:realm/applications/:application/roles/:roleId', {
         realm : '@realm',
         application : "@application",
         roleId : '@roleId'
@@ -203,7 +203,7 @@ module.factory('ApplicationRole', function($resource) {
 
 
 module.factory('Application', function($resource) {
-    return $resource('/auth-server/rest/saas/admin/realms/:realm/applications/:id', {
+    return $resource('/auth/rest/admin/realms/:realm/applications/:id', {
         realm : '@realm',
         id : '@id'
     },  {
@@ -214,8 +214,8 @@ module.factory('Application', function($resource) {
 });
 
 module.factory('ApplicationInstallation', function($resource) {
-    var url = '/auth-server/rest/saas/admin/realms/:realm/applications/:application/installation';
-    var resource = $resource('/auth-server/rest/saas/admin/realms/:realm/applications/:application/installation', {
+    var url = '/auth/rest/admin/realms/:realm/applications/:application/installation';
+    var resource = $resource('/auth/rest/admin/realms/:realm/applications/:application/installation', {
         realm : '@realm',
         application : '@application'
     },  {
@@ -230,7 +230,7 @@ module.factory('ApplicationInstallation', function($resource) {
 });
 
 module.factory('ApplicationCredentials', function($resource) {
-    return $resource('/auth-server/rest/saas/admin/realms/:realm/applications/:application/credentials', {
+    return $resource('/auth/rest/admin/realms/:realm/applications/:application/credentials', {
         realm : '@realm',
         application : '@application'
     },  {
@@ -242,7 +242,7 @@ module.factory('ApplicationCredentials', function($resource) {
 });
 
 module.factory('ApplicationOrigins', function($resource) {
-    return $resource('/auth-server/rest/saas/admin/realms/:realm/applications/:application/allowed-origins', {
+    return $resource('/auth/rest/admin/realms/:realm/applications/:application/allowed-origins', {
         realm : '@realm',
         application : '@application'
     },  {
@@ -254,7 +254,7 @@ module.factory('ApplicationOrigins', function($resource) {
 });
 
 module.factory('OAuthClient', function($resource) {
-    return $resource('/auth-server/rest/saas/admin/realms/:realm/oauth-clients/:id', {
+    return $resource('/auth/rest/admin/realms/:realm/oauth-clients/:id', {
         realm : '@realm',
         id : '@id'
     },  {
@@ -265,7 +265,7 @@ module.factory('OAuthClient', function($resource) {
 });
 
 module.factory('OAuthClientCredentials', function($resource) {
-    return $resource('/auth-server/rest/saas/admin/realms/:realm/oauth-clients/:oauth/credentials', {
+    return $resource('/auth/rest/admin/realms/:realm/oauth-clients/:oauth/credentials', {
         realm : '@realm',
         oauth : '@oauth'
     },  {
@@ -277,14 +277,14 @@ module.factory('OAuthClientCredentials', function($resource) {
 });
 
 module.factory('OAuthClientRealmScopeMapping', function($resource) {
-    return $resource('/auth-server/rest/saas/admin/realms/:realm/oauth-clients/:oauth/scope-mappings/realm', {
+    return $resource('/auth/rest/admin/realms/:realm/oauth-clients/:oauth/scope-mappings/realm', {
         realm : '@realm',
         oauth : '@oauth'
     });
 });
 
 module.factory('OAuthClientApplicationScopeMapping', function($resource) {
-    return $resource('/auth-server/rest/saas/admin/realms/:realm/oauth-clients/:oauth/scope-mappings/applications/:targetApp', {
+    return $resource('/auth/rest/admin/realms/:realm/oauth-clients/:oauth/scope-mappings/applications/:targetApp', {
         realm : '@realm',
         oauth : '@oauth',
         targetApp : '@targetApp'
@@ -292,8 +292,8 @@ module.factory('OAuthClientApplicationScopeMapping', function($resource) {
 });
 
 module.factory('OAuthClientInstallation', function($resource) {
-    var url = '/auth-server/rest/saas/admin/realms/:realm/oauth-clients/:oauth/installation';
-    var resource = $resource('/auth-server/rest/saas/admin/realms/:realm/oauth-clients/:oauth/installation', {
+    var url = '/auth/rest/admin/realms/:realm/oauth-clients/:oauth/installation';
+    var resource = $resource('/auth/rest/admin/realms/:realm/oauth-clients/:oauth/installation', {
         realm : '@realm',
         oauth : '@oauth'
     },  {
diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/partials/menu.html b/admin-ui/src/main/resources/META-INF/resources/admin/partials/menu.html
index bad191d..40fcfe7 100755
--- a/admin-ui/src/main/resources/META-INF/resources/admin/partials/menu.html
+++ b/admin-ui/src/main/resources/META-INF/resources/admin/partials/menu.html
@@ -3,16 +3,16 @@
         <div class="navbar-inner clearfix container">
             <h1><a href="#/"><strong>Keycloak</strong> Central Login</a></h1>
             <ul class="nav pull-right" data-ng-hide="auth.loggedIn">
-                <li><a href="/auth-server/rest/saas/login?path={{fragment}}">Login</a></li>
-                <li><a href="/auth-server/rest/saas/registrations">Register</a></li>
+                <li><a href="/auth/rest/admin/login?path={{fragment}}">Login</a></li>
+                <li><a href="/auth/rest/admin/registrations">Register</a></li>
             </ul>
             <ul class="nav pull-right" data-ng-show="auth.loggedIn">
                 <li class="dropdown">
                     <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                         <span class="icon-user">Icon: user</span>{{auth.user.displayName}}<i class="caret"></i></a>
                     <ul class="dropdown-menu">
-                        <li><a href="/auth-server/rest/realms/Keycloak Administration/account">Manage Account</a></li>
-                        <li class="separator"><a href="/auth-server/rest/saas/logout">Sign Out</a></li>
+                        <li><a href="/auth/rest/realms/Keycloak Administration/account">Manage Account</a></li>
+                        <li class="separator"><a href="/auth/rest/admin/logout">Sign Out</a></li>
                     </ul>
                 </li>
             </ul>
diff --git a/docbook/reference/en/en-US/modules/server-installation.xml b/docbook/reference/en/en-US/modules/server-installation.xml
index 749f246..d611755 100755
--- a/docbook/reference/en/en-US/modules/server-installation.xml
+++ b/docbook/reference/en/en-US/modules/server-installation.xml
@@ -55,8 +55,8 @@ keycloak-appliance-dist-all-1.0-alpha-1-SNAPSHOT/
             <literal>standalone.bat</literal>
             script is used to start the server.
             After executing that, log into the admin console at<ulink
-                url="http://localhost:8080/auth-server/rest/saas/login">
-            http://localhost:8080/auth-server/rest/saas/login</ulink>.
+                url="http://localhost:8080/auth/rest/admin/login">
+            http://localhost:8080/auth/rest/admin/login</ulink>.
             Username:
             <emphasis>admin</emphasis>
             Password:<emphasis>admin</emphasis>. Keycloak with then prompt you to
@@ -104,8 +104,8 @@ keycloak-war-dist-all-1.0-alpha-1-SNAPSHOT/
         <para>
             After booting up the JBoss or Wildfly distro, you can then make sure it is installed properly
             by logging into the admin console at<ulink
-                url="http://localhost:8080/auth-server/rest/saas/login">
-            http://localhost:8080/auth-server/rest/saas/login</ulink>.
+                url="http://localhost:8080/auth/rest/admin/login">
+            http://localhost:8080/auth/rest/admin/login</ulink>.
             Username:
             <emphasis>admin</emphasis>
             Password:<emphasis>admin</emphasis>. Keycloak with then prompt you to
diff --git a/examples/as7-eap-demo/customer-app/src/main/webapp/customers/view.jsp b/examples/as7-eap-demo/customer-app/src/main/webapp/customers/view.jsp
index 71b4efc..44f6fb4 100755
--- a/examples/as7-eap-demo/customer-app/src/main/webapp/customers/view.jsp
+++ b/examples/as7-eap-demo/customer-app/src/main/webapp/customers/view.jsp
@@ -8,9 +8,9 @@
 </head>
 <body bgcolor="#E3F6CE">
 <%
-    String logoutUri = KeycloakUriBuilder.fromUri("http://localhost:8080/auth-server/rest/realms/demo/tokens/logout")
+    String logoutUri = KeycloakUriBuilder.fromUri("http://localhost:8080/auth/rest/realms/demo/tokens/logout")
             .queryParam("redirect_uri", "http://localhost:8080/customer-portal").build().toString();
-    String acctUri =   "http://localhost:8080/auth-server/rest/realms/demo/account";
+    String acctUri =   "http://localhost:8080/auth/rest/realms/demo/account";
 %>
 <p>Goto: <a href="http://localhost:8080/product-portal">products</a> | <a href="<%=logoutUri%>">logout</a> | <a href="<%=acctUri%>">manage acct</a></p>
 User <b><%=request.getUserPrincipal().getName()%></b> made this request.
diff --git a/examples/as7-eap-demo/customer-app/src/main/webapp/WEB-INF/keycloak.json b/examples/as7-eap-demo/customer-app/src/main/webapp/WEB-INF/keycloak.json
index 9be971b..c0c1c44 100755
--- a/examples/as7-eap-demo/customer-app/src/main/webapp/WEB-INF/keycloak.json
+++ b/examples/as7-eap-demo/customer-app/src/main/webapp/WEB-INF/keycloak.json
@@ -2,8 +2,8 @@
   "realm" : "demo",
   "resource" : "customer-portal",
   "realm-public-key" : "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB",
-  "auth-url" : "http://localhost:8080/auth-server/rest/realms/demo/tokens/login",
-  "code-url" : "http://localhost:8080/auth-server/rest/realms/demo/tokens/access/codes",
+  "auth-url" : "http://localhost:8080/auth/rest/realms/demo/tokens/login",
+  "code-url" : "http://localhost:8080/auth/rest/realms/demo/tokens/access/codes",
   "ssl-not-required" : true,
   "expose-token" : true,
    "credentials" : {
diff --git a/examples/as7-eap-demo/product-app/src/main/webapp/products/view.jsp b/examples/as7-eap-demo/product-app/src/main/webapp/products/view.jsp
index bc9ef81..f476872 100755
--- a/examples/as7-eap-demo/product-app/src/main/webapp/products/view.jsp
+++ b/examples/as7-eap-demo/product-app/src/main/webapp/products/view.jsp
@@ -8,9 +8,9 @@
 </head>
 <body bgcolor="#F5F6CE">
 <%
-   String logoutUri = KeycloakUriBuilder.fromUri("http://localhost:8080/auth-server/rest/realms/demo/tokens/logout")
+   String logoutUri = KeycloakUriBuilder.fromUri("http://localhost:8080/auth/rest/realms/demo/tokens/logout")
                                      .queryParam("redirect_uri", "http://localhost:8080/product-portal").build().toString();
-    String acctUri =   "http://localhost:8080/auth-server/rest/realms/demo/account";
+    String acctUri =   "http://localhost:8080/auth/rest/realms/demo/account";
 %>
 
 <p>Goto: <a href="http://localhost:8080/customer-portal">customers</a> | <a href="<%=logoutUri%>">logout</a> | <a href="<%=acctUri%>">manage acct</a></p>
diff --git a/examples/as7-eap-demo/product-app/src/main/webapp/WEB-INF/keycloak.json b/examples/as7-eap-demo/product-app/src/main/webapp/WEB-INF/keycloak.json
index 26bc1fe..c4f16a9 100755
--- a/examples/as7-eap-demo/product-app/src/main/webapp/WEB-INF/keycloak.json
+++ b/examples/as7-eap-demo/product-app/src/main/webapp/WEB-INF/keycloak.json
@@ -2,8 +2,8 @@
   "realm" : "demo",
   "resource" : "product-portal",
   "realm-public-key" : "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB",
-  "auth-url" : "http://localhost:8080/auth-server/rest/realms/demo/tokens/login",
-  "code-url" : "http://localhost:8080/auth-server/rest/realms/demo/tokens/access/codes",
+  "auth-url" : "http://localhost:8080/auth/rest/realms/demo/tokens/login",
+  "code-url" : "http://localhost:8080/auth/rest/realms/demo/tokens/access/codes",
    "ssl-not-required" : true,
    "credentials" : {
       "password" : "password"
diff --git a/examples/as7-eap-demo/README.md b/examples/as7-eap-demo/README.md
index 49008c1..8bc8880 100755
--- a/examples/as7-eap-demo/README.md
+++ b/examples/as7-eap-demo/README.md
@@ -50,7 +50,7 @@ Next thing you have to do is import the test realm for the demo.  Clicking on th
 create realm page in the admin UI.  The username/password is admin/admin to login in.  Keycloak will ask you to
 create a new password admin password before you can go to the create realm page.
 
-[http://localhost:8080/auth-server/admin/index.html#/create/realm](http://localhost:8080/auth-server/admin/index.html#/create/realm)
+[http://localhost:8080/auth/admin/index.html#/create/realm](http://localhost:8080/auth/admin/index.html#/create/realm)
 
 Import the testrealm.json file that is in the as7-eap6-demo/ example directory.
 
@@ -92,7 +92,7 @@ Admin Console
 1. Login
 
 Login:
-[http://localhost:8080/auth-server/rest/saas/login](http://localhost:8080/auth-server/rest/saas/login)
+[http://localhost:8080/auth/rest/admin/login](http://localhost:8080/auth/rest/admin/login)
 
 
 
diff --git a/examples/as7-eap-demo/third-party/src/main/webapp/WEB-INF/keycloak.json b/examples/as7-eap-demo/third-party/src/main/webapp/WEB-INF/keycloak.json
old mode 100644
new mode 100755
index 7241bce..2bd3f82
--- a/examples/as7-eap-demo/third-party/src/main/webapp/WEB-INF/keycloak.json
+++ b/examples/as7-eap-demo/third-party/src/main/webapp/WEB-INF/keycloak.json
@@ -1,7 +1,7 @@
 {
   "resource" : "third-party",
-  "auth-url" : "http://localhost:8080/auth-server/rest/realms/demo/tokens/login",
-  "code-url" : "http://localhost:8080/auth-server/rest/realms/demo/tokens/access/codes",
+  "auth-url" : "http://localhost:8080/auth/rest/realms/demo/tokens/login",
+  "code-url" : "http://localhost:8080/auth/rest/realms/demo/tokens/access/codes",
   "ssl-not-required" : true,
    "credentials" : {
       "password" : "password"
diff --git a/examples/as7-eap-demo/third-party-cdi/src/main/webapp/WEB-INF/keycloak.json b/examples/as7-eap-demo/third-party-cdi/src/main/webapp/WEB-INF/keycloak.json
old mode 100644
new mode 100755
index 7241bce..2bd3f82
--- a/examples/as7-eap-demo/third-party-cdi/src/main/webapp/WEB-INF/keycloak.json
+++ b/examples/as7-eap-demo/third-party-cdi/src/main/webapp/WEB-INF/keycloak.json
@@ -1,7 +1,7 @@
 {
   "resource" : "third-party",
-  "auth-url" : "http://localhost:8080/auth-server/rest/realms/demo/tokens/login",
-  "code-url" : "http://localhost:8080/auth-server/rest/realms/demo/tokens/access/codes",
+  "auth-url" : "http://localhost:8080/auth/rest/realms/demo/tokens/login",
+  "code-url" : "http://localhost:8080/auth/rest/realms/demo/tokens/access/codes",
   "ssl-not-required" : true,
    "credentials" : {
       "password" : "password"
diff --git a/examples/wildfly-demo/customer-app/src/main/webapp/customers/view.jsp b/examples/wildfly-demo/customer-app/src/main/webapp/customers/view.jsp
index 71b4efc..44f6fb4 100755
--- a/examples/wildfly-demo/customer-app/src/main/webapp/customers/view.jsp
+++ b/examples/wildfly-demo/customer-app/src/main/webapp/customers/view.jsp
@@ -8,9 +8,9 @@
 </head>
 <body bgcolor="#E3F6CE">
 <%
-    String logoutUri = KeycloakUriBuilder.fromUri("http://localhost:8080/auth-server/rest/realms/demo/tokens/logout")
+    String logoutUri = KeycloakUriBuilder.fromUri("http://localhost:8080/auth/rest/realms/demo/tokens/logout")
             .queryParam("redirect_uri", "http://localhost:8080/customer-portal").build().toString();
-    String acctUri =   "http://localhost:8080/auth-server/rest/realms/demo/account";
+    String acctUri =   "http://localhost:8080/auth/rest/realms/demo/account";
 %>
 <p>Goto: <a href="http://localhost:8080/product-portal">products</a> | <a href="<%=logoutUri%>">logout</a> | <a href="<%=acctUri%>">manage acct</a></p>
 User <b><%=request.getUserPrincipal().getName()%></b> made this request.
diff --git a/examples/wildfly-demo/customer-app/src/main/webapp/WEB-INF/keycloak.json b/examples/wildfly-demo/customer-app/src/main/webapp/WEB-INF/keycloak.json
index 9be971b..c0c1c44 100755
--- a/examples/wildfly-demo/customer-app/src/main/webapp/WEB-INF/keycloak.json
+++ b/examples/wildfly-demo/customer-app/src/main/webapp/WEB-INF/keycloak.json
@@ -2,8 +2,8 @@
   "realm" : "demo",
   "resource" : "customer-portal",
   "realm-public-key" : "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB",
-  "auth-url" : "http://localhost:8080/auth-server/rest/realms/demo/tokens/login",
-  "code-url" : "http://localhost:8080/auth-server/rest/realms/demo/tokens/access/codes",
+  "auth-url" : "http://localhost:8080/auth/rest/realms/demo/tokens/login",
+  "code-url" : "http://localhost:8080/auth/rest/realms/demo/tokens/access/codes",
   "ssl-not-required" : true,
   "expose-token" : true,
    "credentials" : {
diff --git a/examples/wildfly-demo/product-app/src/main/webapp/products/view.jsp b/examples/wildfly-demo/product-app/src/main/webapp/products/view.jsp
index bc9ef81..f476872 100755
--- a/examples/wildfly-demo/product-app/src/main/webapp/products/view.jsp
+++ b/examples/wildfly-demo/product-app/src/main/webapp/products/view.jsp
@@ -8,9 +8,9 @@
 </head>
 <body bgcolor="#F5F6CE">
 <%
-   String logoutUri = KeycloakUriBuilder.fromUri("http://localhost:8080/auth-server/rest/realms/demo/tokens/logout")
+   String logoutUri = KeycloakUriBuilder.fromUri("http://localhost:8080/auth/rest/realms/demo/tokens/logout")
                                      .queryParam("redirect_uri", "http://localhost:8080/product-portal").build().toString();
-    String acctUri =   "http://localhost:8080/auth-server/rest/realms/demo/account";
+    String acctUri =   "http://localhost:8080/auth/rest/realms/demo/account";
 %>
 
 <p>Goto: <a href="http://localhost:8080/customer-portal">customers</a> | <a href="<%=logoutUri%>">logout</a> | <a href="<%=acctUri%>">manage acct</a></p>
diff --git a/examples/wildfly-demo/product-app/src/main/webapp/WEB-INF/keycloak.json b/examples/wildfly-demo/product-app/src/main/webapp/WEB-INF/keycloak.json
index 26bc1fe..c4f16a9 100755
--- a/examples/wildfly-demo/product-app/src/main/webapp/WEB-INF/keycloak.json
+++ b/examples/wildfly-demo/product-app/src/main/webapp/WEB-INF/keycloak.json
@@ -2,8 +2,8 @@
   "realm" : "demo",
   "resource" : "product-portal",
   "realm-public-key" : "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB",
-  "auth-url" : "http://localhost:8080/auth-server/rest/realms/demo/tokens/login",
-  "code-url" : "http://localhost:8080/auth-server/rest/realms/demo/tokens/access/codes",
+  "auth-url" : "http://localhost:8080/auth/rest/realms/demo/tokens/login",
+  "code-url" : "http://localhost:8080/auth/rest/realms/demo/tokens/access/codes",
    "ssl-not-required" : true,
    "credentials" : {
       "password" : "password"
diff --git a/examples/wildfly-demo/README.md b/examples/wildfly-demo/README.md
index 9425964..d10155b 100755
--- a/examples/wildfly-demo/README.md
+++ b/examples/wildfly-demo/README.md
@@ -54,7 +54,7 @@ Next thing you have to do is import the test realm for the demo.  Clicking on th
 create realm page in the Admin UI.  The username/password is admin/admin to login in.  Keycloak will ask you to
 create a new admin password before you can go to the create realm page.
 
-[http://localhost:8080/auth-server/admin/index.html#/create/realm](http://localhost:8080/auth-server/admin/index.html#/create/realm)
+[http://localhost:8080/auth/admin/index.html#/create/realm](http://localhost:8080/auth/admin/index.html#/create/realm)
 
 Import the testrealm.json file that is in the wildfly-demo/ example directory.
 
@@ -93,7 +93,7 @@ an oauth grant page.  This page asks you if you want to grant certain permission
 Admin Console
 ==========================
 
-[http://localhost:8080/auth-server/admin/index.html](http://localhost:8080/auth-server/admin/index.html)
+[http://localhost:8080/auth/admin/index.html](http://localhost:8080/auth/admin/index.html)
 
 
 
diff --git a/examples/wildfly-demo/third-party/src/main/webapp/WEB-INF/keycloak.json b/examples/wildfly-demo/third-party/src/main/webapp/WEB-INF/keycloak.json
old mode 100644
new mode 100755
index 7241bce..2bd3f82
--- a/examples/wildfly-demo/third-party/src/main/webapp/WEB-INF/keycloak.json
+++ b/examples/wildfly-demo/third-party/src/main/webapp/WEB-INF/keycloak.json
@@ -1,7 +1,7 @@
 {
   "resource" : "third-party",
-  "auth-url" : "http://localhost:8080/auth-server/rest/realms/demo/tokens/login",
-  "code-url" : "http://localhost:8080/auth-server/rest/realms/demo/tokens/access/codes",
+  "auth-url" : "http://localhost:8080/auth/rest/realms/demo/tokens/login",
+  "code-url" : "http://localhost:8080/auth/rest/realms/demo/tokens/access/codes",
   "ssl-not-required" : true,
    "credentials" : {
       "password" : "password"
diff --git a/examples/wildfly-demo/third-party-cdi/src/main/webapp/WEB-INF/keycloak.json b/examples/wildfly-demo/third-party-cdi/src/main/webapp/WEB-INF/keycloak.json
old mode 100644
new mode 100755
index 7241bce..2bd3f82
--- a/examples/wildfly-demo/third-party-cdi/src/main/webapp/WEB-INF/keycloak.json
+++ b/examples/wildfly-demo/third-party-cdi/src/main/webapp/WEB-INF/keycloak.json
@@ -1,7 +1,7 @@
 {
   "resource" : "third-party",
-  "auth-url" : "http://localhost:8080/auth-server/rest/realms/demo/tokens/login",
-  "code-url" : "http://localhost:8080/auth-server/rest/realms/demo/tokens/access/codes",
+  "auth-url" : "http://localhost:8080/auth/rest/realms/demo/tokens/login",
+  "code-url" : "http://localhost:8080/auth/rest/realms/demo/tokens/access/codes",
   "ssl-not-required" : true,
    "credentials" : {
       "password" : "password"

README.md 2(+1 -1)

diff --git a/README.md b/README.md
old mode 100644
new mode 100755
index 83df3a3..c365e50
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
 keycloak
 ========
 
-SSO SaaS
+SSO Service for web apps and REST services.
diff --git a/server/src/main/webapp/index.html b/server/src/main/webapp/index.html
old mode 100644
new mode 100755
index 805dc19..edca780
--- a/server/src/main/webapp/index.html
+++ b/server/src/main/webapp/index.html
@@ -38,7 +38,7 @@
 
         <h3>Your Keycloak is running.</h3>
 
-        <p><a href="http://www.keycloak.org/documentation">Documentation</a> | <a href="/auth-server/admin/index.html">Administration Console</a> </p>
+        <p><a href="http://www.keycloak.org/documentation">Documentation</a> | <a href="/auth/admin/index.html">Administration Console</a> </p>
 
         <p><a href="http://www.keycloak.org">Keycloak Project</a> |
             <a href="https://lists.jboss.org/mailman/listinfo/keycloak-user">Mailing List</a> |
diff --git a/server/src/main/webapp/WEB-INF/web.xml b/server/src/main/webapp/WEB-INF/web.xml
index 0b1e810..45d0d04 100755
--- a/server/src/main/webapp/WEB-INF/web.xml
+++ b/server/src/main/webapp/WEB-INF/web.xml
@@ -4,7 +4,7 @@
       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
       version="3.0">
 
-	<module-name>auth-server</module-name>
+	<module-name>auth</module-name>
 
     <servlet>
         <servlet-name>Resteasy</servlet-name>
diff --git a/services/src/main/java/org/keycloak/services/managers/AuthenticationManager.java b/services/src/main/java/org/keycloak/services/managers/AuthenticationManager.java
index 6b6545b..57e3b9a 100755
--- a/services/src/main/java/org/keycloak/services/managers/AuthenticationManager.java
+++ b/services/src/main/java/org/keycloak/services/managers/AuthenticationManager.java
@@ -13,8 +13,8 @@ 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.RealmsResource;
-import org.keycloak.services.resources.SaasService;
 
 import javax.ws.rs.NotAuthorizedException;
 import javax.ws.rs.core.Cookie;
@@ -59,8 +59,8 @@ public class AuthenticationManager {
     }
 
     public NewCookie createSaasIdentityCookie(RealmModel realm, UserModel user, UriInfo uriInfo) {
-        String cookieName = SaasService.SAAS_IDENTITY_COOKIE;
-        URI uri = SaasService.saasCookiePath(uriInfo).build();
+        String cookieName = AdminService.SAAS_IDENTITY_COOKIE;
+        URI uri = AdminService.saasCookiePath(uriInfo).build();
         String cookiePath = uri.getRawPath();
         return createLoginCookie(realm, user, null, cookieName, cookiePath);
     }
@@ -100,9 +100,9 @@ public class AuthenticationManager {
     }
 
     public void expireSaasIdentityCookie(UriInfo uriInfo) {
-        URI uri = SaasService.saasCookiePath(uriInfo).build();
+        URI uri = AdminService.saasCookiePath(uriInfo).build();
         String cookiePath = uri.getRawPath();
-        expireCookie(SaasService.SAAS_IDENTITY_COOKIE, cookiePath);
+        expireCookie(AdminService.SAAS_IDENTITY_COOKIE, cookiePath);
     }
 
     public void expireAccountIdentityCookie(URI uri) {
@@ -128,7 +128,7 @@ public class AuthenticationManager {
     }
 
     public UserModel authenticateSaasIdentityCookie(RealmModel realm, UriInfo uriInfo, HttpHeaders headers) {
-        String cookieName = SaasService.SAAS_IDENTITY_COOKIE;
+        String cookieName = AdminService.SAAS_IDENTITY_COOKIE;
         Auth auth = authenticateIdentityCookie(realm, uriInfo, headers, cookieName);
         return auth != null ? auth.getUser() : null;
     }
diff --git a/services/src/main/java/org/keycloak/services/resources/admin/RealmsAdminResource.java b/services/src/main/java/org/keycloak/services/resources/admin/RealmsAdminResource.java
index 1247547..66decd9 100755
--- a/services/src/main/java/org/keycloak/services/resources/admin/RealmsAdminResource.java
+++ b/services/src/main/java/org/keycloak/services/resources/admin/RealmsAdminResource.java
@@ -10,7 +10,7 @@ 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.SaasService;
+import org.keycloak.services.resources.AdminService;
 import org.keycloak.services.resources.flows.Flows;
 
 import javax.ws.rs.*;
@@ -19,7 +19,6 @@ import javax.ws.rs.core.CacheControl;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriBuilder;
 import javax.ws.rs.core.UriInfo;
@@ -71,7 +70,7 @@ public class RealmsAdminResource {
     }
 
     public static UriBuilder realmsUrl(UriInfo uriInfo) {
-        return uriInfo.getBaseUriBuilder().path(SaasService.class).path(SaasService.class, "getRealmsAdmin");
+        return uriInfo.getBaseUriBuilder().path(AdminService.class).path(AdminService.class, "getRealmsAdmin");
     }
 
     @POST
diff --git a/services/src/main/java/org/keycloak/services/resources/flows/Urls.java b/services/src/main/java/org/keycloak/services/resources/flows/Urls.java
index 15d6d36..204bafc 100755
--- a/services/src/main/java/org/keycloak/services/resources/flows/Urls.java
+++ b/services/src/main/java/org/keycloak/services/resources/flows/Urls.java
@@ -22,9 +22,9 @@
 package org.keycloak.services.resources.flows;
 
 import org.keycloak.services.resources.AccountService;
+import org.keycloak.services.resources.AdminService;
 import org.keycloak.services.resources.RealmsResource;
 import org.keycloak.services.resources.RequiredActionsService;
-import org.keycloak.services.resources.SaasService;
 import org.keycloak.services.resources.SocialResource;
 import org.keycloak.services.resources.TokenService;
 
@@ -133,23 +133,23 @@ public class Urls {
     }
 
     private static UriBuilder saasBase(URI baseUri) {
-        return UriBuilder.fromUri(baseUri).path(SaasService.class);
+        return UriBuilder.fromUri(baseUri).path(AdminService.class);
     }
 
     public static URI saasLoginAction(URI baseUri) {
-        return saasBase(baseUri).path(SaasService.class, "processLogin").build();
+        return saasBase(baseUri).path(AdminService.class, "processLogin").build();
     }
 
     public static URI saasLoginPage(URI baseUri) {
-        return saasBase(baseUri).path(SaasService.class, "loginPage").build();
+        return saasBase(baseUri).path(AdminService.class, "loginPage").build();
     }
 
     public static URI saasRegisterAction(URI baseUri) {
-        return saasBase(baseUri).path(SaasService.class, "processRegister").build();
+        return saasBase(baseUri).path(AdminService.class, "processRegister").build();
     }
 
     public static URI saasRegisterPage(URI baseUri) {
-        return saasBase(baseUri).path(SaasService.class, "registerPage").build();
+        return saasBase(baseUri).path(AdminService.class, "registerPage").build();
     }
 
     public static UriBuilder socialBase(URI baseUri) {
diff --git a/services/src/main/java/org/keycloak/services/resources/KeycloakApplication.java b/services/src/main/java/org/keycloak/services/resources/KeycloakApplication.java
index 9e63dac..3a3f77f 100755
--- a/services/src/main/java/org/keycloak/services/resources/KeycloakApplication.java
+++ b/services/src/main/java/org/keycloak/services/resources/KeycloakApplication.java
@@ -2,13 +2,9 @@ package org.keycloak.services.resources;
 
 import org.jboss.resteasy.logging.Logger;
 import org.keycloak.SkeletonKeyContextResolver;
-import org.keycloak.models.Constants;
-import org.keycloak.models.KeycloakSession;
 import org.keycloak.models.KeycloakSessionFactory;
 import org.keycloak.models.ModelProvider;
-import org.keycloak.models.UserModel;
 import org.keycloak.services.managers.ApplianceBootstrap;
-import org.keycloak.services.managers.RealmManager;
 import org.keycloak.services.managers.SocialRequestManager;
 import org.keycloak.services.managers.TokenManager;
 
@@ -44,7 +40,7 @@ public class KeycloakApplication extends Application {
         TokenManager tokenManager = new TokenManager();
 
         singletons.add(new RealmsResource(tokenManager));
-        singletons.add(new SaasService(tokenManager));
+        singletons.add(new AdminService(tokenManager));
         singletons.add(new SocialResource(tokenManager, new SocialRequestManager()));
         classes.add(SkeletonKeyContextResolver.class);
         classes.add(QRCodeResource.class);
diff --git a/testsuite/integration/src/main/java/org/keycloak/testutils/KeycloakServer.java b/testsuite/integration/src/main/java/org/keycloak/testutils/KeycloakServer.java
index f6affa3..c3edfe9 100755
--- a/testsuite/integration/src/main/java/org/keycloak/testutils/KeycloakServer.java
+++ b/testsuite/integration/src/main/java/org/keycloak/testutils/KeycloakServer.java
@@ -250,7 +250,7 @@ public class KeycloakServer {
 
         DeploymentInfo di = server.undertowDeployment(deployment, "rest");
         di.setClassLoader(getClass().getClassLoader());
-        di.setContextPath("/auth-server");
+        di.setContextPath("/auth");
         di.setDeploymentName("Keycloak");
         di.setResourceManager(new KeycloakResourceManager(config.getResourcesHome()));
 
@@ -275,7 +275,7 @@ public class KeycloakServer {
             info("Loading resources from " + config.getResourcesHome());
         }
 
-        info("Started Keycloak (http://" + config.getHost() + ":" + config.getPort() + "/auth-server) in "
+        info("Started Keycloak (http://" + config.getHost() + ":" + config.getPort() + "/auth) in "
                 + (System.currentTimeMillis() - start) + " ms\n");
     }
 
diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/ApplicationServlet.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/ApplicationServlet.java
index 996085e..8d910af 100755
--- a/testsuite/integration/src/test/java/org/keycloak/testsuite/ApplicationServlet.java
+++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/ApplicationServlet.java
@@ -55,7 +55,7 @@ public class ApplicationServlet extends HttpServlet {
         PrintWriter pw = resp.getWriter();
         pw.printf("<html><head><title>%s</title></head><body>", title);
 
-        pw.printf(LINK, "http://localhost:8081/auth-server/rest/realms/test/account", "account", "account");
+        pw.printf(LINK, "http://localhost:8081/auth/rest/realms/test/account", "account", "account");
 
         pw.print("</body></html>");
         pw.flush();
diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/Constants.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/Constants.java
old mode 100644
new mode 100755
index 3b9d155..459f44c
--- a/testsuite/integration/src/test/java/org/keycloak/testsuite/Constants.java
+++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/Constants.java
@@ -26,6 +26,6 @@ package org.keycloak.testsuite;
  */
 public class Constants {
 
-    public static String AUTH_SERVER_ROOT = "http://localhost:8081/auth-server";
+    public static String AUTH_SERVER_ROOT = "http://localhost:8081/auth";
 
 }