[keycloak-user] Keycloak offline token

Marek Posolda mposolda at redhat.com
Wed Nov 25 05:33:11 EST 2015


This doesn't seem to be related to offline tokens. Are your cookies 
KEYCLOAK_IDENTITY and KEYCLOAK_SESSION persistent or transient? Could 
you check if you don't have "remember me" enabled for your realm and 
login session?

Marek

On 25/11/15 00:00, Carlos Feria wrote:
> Hello. I migrated my keycloak to keycloak-1.6.1.Final and i have a 
> problem with the session persistence.
>
> I have a pure javascript application, this uses javacript adapter. 
> When i had other version of keycloak, the session is close when i do 
> logout or close the browser, but now in keycloak-1.6.1.Final the 
> session is not detroyed when i close the browser, i see that session 
> is on cookie.
>
> I delete the offline role of my users and roles but the session don't 
> close. How can i delete the session when i close the brower? Please 
> help me.
>
> this is my angular interceptor an bootstrap method:
>
> keycloak.init({onLoad:'login-required'}).success(function () {
>    window.auth.authz  =keycloak;
> angular.module('mean').factory('Auth',function () {
>      return window.auth;
>    });
>    //Then init the app
> angular.bootstrap(document, [ApplicationConfiguration.applicationModuleName]);
> }).error(function () {
>    window.location.reload();
> });
> angular.module('mean').factory('authInterceptor',function ($q, Auth) {
>    return {
>      request:function (config) {
>        if (!config.url.match(/.html$/)) {
>          var deferred = $q.defer();
>          if (Auth.authz.token) {
>            Auth.authz.updateToken(5).success(function () {
>              config.headers = config.headers || {};
>              config.headers.Authorization ='Bearer ' + Auth.authz.token;
>
>              deferred.resolve(config);
>            }).error(function () {
>              location.reload();
>            });
>          }
>          return deferred.promise;
>        }else {
>          return config;
>        }
>      }
>    };
> });
>
> -- 
> Carlos E. Feria Vila
>
>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20151125/d6a4943b/attachment-0001.html 


More information about the keycloak-user mailing list