<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">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?
<br>
<br>
Marek<br>
<br>
On 25/11/15 00:00, Carlos Feria wrote:<br>
</div>
<blockquote
cite="mid:CAAdSQ6iMPoCZwSPQrW8BYHf0CD4n2F41WS+iGLaTmghk2n03uw@mail.gmail.com"
type="cite">
<div dir="ltr">Hello. I migrated my keycloak to
keycloak-1.6.1.Final and i have a problem with the session
persistence.
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>this is my angular interceptor an bootstrap method:</div>
<div><br>
</div>
<div>
<pre style="color:rgb(0,0,0);font-family:'DejaVu Sans Mono'"><span style="color:rgb(69,131,131)">keycloak</span>.<span style="color:rgb(122,122,67)">init</span>({<span style="color:rgb(102,14,122);font-weight:bold">onLoad</span>: <span style="color:rgb(0,128,0);font-weight:bold">'login-required'</span>}).<span style="color:rgb(122,122,67)">success</span>(<span style="color:rgb(0,0,128);font-weight:bold">function </span>() {
<span style="color:rgb(102,14,122);font-weight:bold;font-style:italic">window</span>.<span style="color:rgb(102,14,122);font-weight:bold">auth</span>.<span style="background-color:rgb(255,228,255)">authz</span> = <span style="color:rgb(69,131,131)">keycloak</span>;<pre style="font-family:'DejaVu Sans Mono'"><span style="color:rgb(102,14,122);font-weight:bold"> angular</span>.<span style="color:rgb(102,14,122);font-weight:bold">module</span>(<span style="color:rgb(0,128,0);font-weight:bold">'mean'</span>).<span style="color:rgb(122,122,67)">factory</span>(<span style="color:rgb(0,128,0);font-weight:bold">'Auth'</span>, <span style="color:rgb(0,0,128);font-weight:bold">function </span>() {
<span style="color:rgb(0,0,128);font-weight:bold">return </span><span style="color:rgb(102,14,122);font-weight:bold;font-style:italic">window</span>.<span style="color:rgb(102,14,122);font-weight:bold">auth</span>;
});</pre> <span style="color:rgb(128,128,128);font-style:italic">//Then init the app</span></pre>
<pre style="color:rgb(0,0,0);font-family:'DejaVu Sans Mono'"><span style="color:rgb(102,14,122);font-weight:bold"> angular</span>.<span style="color:rgb(102,14,122);font-weight:bold">bootstrap</span>(<span style="color:rgb(102,14,122);font-weight:bold">document</span>, [<span style="color:rgb(102,14,122);font-weight:bold;font-style:italic">ApplicationConfiguration</span>.<span style="color:rgb(102,14,122);font-weight:bold">applicationModuleName</span>]); <span style="color:rgb(128,128,128);font-style:italic"> </span></pre>
<pre style="color:rgb(0,0,0);font-family:'DejaVu Sans Mono'"><pre style="font-family:'DejaVu Sans Mono'">}).<span style="color:rgb(122,122,67)">error</span>(<span style="color:rgb(0,0,128);font-weight:bold">function </span>() {
<span style="color:rgb(102,14,122);font-weight:bold;font-style:italic">window</span>.<span style="color:rgb(102,14,122);font-weight:bold">location</span>.<span style="color:rgb(122,122,67)">reload</span>();
});</pre></pre>
<pre style="color:rgb(0,0,0);font-family:'DejaVu Sans Mono'">
</pre>
</div>
<div>
<pre style="color:rgb(0,0,0);font-family:'DejaVu Sans Mono'"><span style="background-color:rgb(228,228,255)">angular</span>.<span style="color:rgb(102,14,122);font-weight:bold">module</span>(<span style="color:rgb(0,128,0);font-weight:bold">'mean'</span>).<span style="color:rgb(122,122,67)">factory</span>(<span style="color:rgb(0,128,0);font-weight:bold">'authInterceptor'</span>, <span style="color:rgb(0,0,128);font-weight:bold">function </span>($q, Auth) {
<span style="color:rgb(0,0,128);font-weight:bold">return </span>{
<span style="color:rgb(122,122,67)">request</span>: <span style="color:rgb(0,0,128);font-weight:bold">function </span>(config) {
<span style="color:rgb(0,0,128);font-weight:bold">if </span>(!config.<span style="color:rgb(102,14,122);font-weight:bold">url</span>.<span style="color:rgb(122,122,67)">match</span>(<span style="color:rgb(0,0,255)">/.html$/</span>)) {
<span style="color:rgb(0,0,128);font-weight:bold">var </span><span style="color:rgb(69,131,131)">deferred </span>= $q.<span style="color:rgb(122,122,67)">defer</span>();
<span style="color:rgb(0,0,128);font-weight:bold">if </span>(Auth.<span style="color:rgb(102,14,122);font-weight:bold">authz</span>.<span style="color:rgb(102,14,122);font-weight:bold">token</span>) {
Auth.<span style="color:rgb(102,14,122);font-weight:bold">authz</span>.<span style="color:rgb(122,122,67)">updateToken</span>(<span style="color:rgb(0,0,255)">5</span>).<span style="color:rgb(122,122,67)">success</span>(<span style="color:rgb(0,0,128);font-weight:bold">function </span>() {
config.<span style="color:rgb(102,14,122);font-weight:bold">headers </span>= config.<span style="color:rgb(102,14,122);font-weight:bold">headers </span>|| {};
config.<span style="color:rgb(102,14,122);font-weight:bold">headers</span>.<span style="color:rgb(102,14,122);font-weight:bold">Authorization </span>= <span style="color:rgb(0,128,0);font-weight:bold">'Bearer ' </span>+ Auth.<span style="color:rgb(102,14,122);font-weight:bold">authz</span>.<span style="color:rgb(102,14,122);font-weight:bold">token</span>;
<span style="color:rgb(69,131,131)">deferred</span>.<span style="color:rgb(102,14,122);font-weight:bold">resolve</span>(config);
}).<span style="color:rgb(122,122,67)">error</span>(<span style="color:rgb(0,0,128);font-weight:bold">function </span>() {
<span style="color:rgb(102,14,122);font-weight:bold">location</span>.<span style="color:rgb(122,122,67)">reload</span>();
});
}
<span style="color:rgb(0,0,128);font-weight:bold">return </span><span style="color:rgb(69,131,131)">deferred</span>.<span style="color:rgb(122,122,67)">promise</span>;
} <span style="color:rgb(0,0,128);font-weight:bold">else </span>{
<span style="color:rgb(0,0,128);font-weight:bold">return </span>config;
}
}
};
});</pre>
<pre style="color:rgb(0,0,0);font-family:'DejaVu Sans Mono'">
</pre>
<pre style="color:rgb(0,0,0);font-family:'DejaVu Sans Mono'">
</pre>
<div><br>
</div>
-- <br>
<div class="gmail_signature">Carlos E. Feria Vila<br>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
keycloak-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/keycloak-user">https://lists.jboss.org/mailman/listinfo/keycloak-user</a></pre>
</blockquote>
<br>
</body>
</html>