Merge pull request #699 from mposolda/master

Admin console fixes, KEYCLOAK_REMEMBER_ME life changed to 1 year
This commit is contained in:
Marek Posolda committed 2014-09-18 11:15:09 +02:00
commit 825c475c7f
3 files changed
+3 -8

No files matched your search

@@ -246,7 +246,6 @@ module.controller('ApplicationDetailCtrl', function($scope, realm, application,
}
} else {
$scope.application = { enabled: true };
$scope.application.webOrigins = [];
$scope.application.redirectUris = [];
$scope.accessType = $scope.accessTypes[0];
}
@@ -296,10 +295,6 @@ module.controller('ApplicationDetailCtrl', function($scope, realm, application,
Notifications.error("You must specify at least one redirect uri");
} else {
if ($scope.create) {
if ($scope.application.webOrigins.length == 0) {
// let rest api put in default webOrigins
$scope.application.webOrigins = null;
}
Application.save({
realm: realm.realm,
application: ''
@@ -1,4 +1,4 @@
<ul class="nav nav-tabs nav-tabs-pf">
<ul class="nav nav-tabs nav-tabs-pf" data-ng-show="!create">
<li ng-class="{active: !path[4]}"><a href="#/realms/{{realm.realm}}/oauth-clients/{{oauth.name}}">Settings</a></li>
<li ng-class="{active: path[4] == 'credentials'}" data-ng-show="!oauth.publicClient"><a href="#/realms/{{realm.realm}}/oauth-clients/{{oauth.name}}/credentials">Credentials</a></li>
<li ng-class="{active: path[4] == 'claims'}"><a href="#/realms/{{realm.realm}}/oauth-clients/{{oauth.name}}/claims">Claims</a></li>
@@ -119,9 +119,9 @@ public class AuthenticationManager {
public void createRememberMeCookie(RealmModel realm, String username, UriInfo uriInfo, ClientConnection connection) {
String path = getIdentityCookiePath(realm, uriInfo);
boolean secureOnly = realm.getSslRequired().isRequired(connection);
// remember me cookie should be persistent (hardcoded to 1 month for now)
// remember me cookie should be persistent (hardcoded to 365 days for now)
//NewCookie cookie = new NewCookie(KEYCLOAK_REMEMBER_ME, "true", path, null, null, realm.getCentralLoginLifespan(), secureOnly);// todo httponly , true);
CookieHelper.addCookie(KEYCLOAK_REMEMBER_ME, username, path, null, null, 2592000, secureOnly, true);
CookieHelper.addCookie(KEYCLOAK_REMEMBER_ME, username, path, null, null, 31536000, secureOnly, true);
}
protected String encodeToken(RealmModel realm, Object token) {