<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">We have 2 timeouts related to session:<br>
<br>
- Idle timeout: it's 30 minutes by default. It is refreshed after
each token refresh or successful SSO login. In other words, in
your Javascript application, you need to perform token refresh at
least once per 30 minutes. The timeout is available on
refreshToken and can be checked in your JS application by
"keycloak.refreshTokenParsed.exp" <br>
<br>
- Max session lifespan: It's 10 hours by default. This is really
maximum timeout of each session from login time. Even if you
refresh your token each 30 minutes, after 10 hours will be session
expired and your user would really need to get redirected to KC
login screen and re-authenticate. This is not available in JS app
afaik, but people still need to re-authenticate after this time,
so I think it's not an issue.<br>
<br>
All timeouts are configurable. See
<a class="moz-txt-link-freetext" href="http://docs.jboss.org/keycloak/docs/1.1.0.Final/userguide/html/timeouts.html">http://docs.jboss.org/keycloak/docs/1.1.0.Final/userguide/html/timeouts.html</a><br>
<br>
Marek<br>
<br>
On 3.2.2015 10:59, Christoph Machnik wrote:<br>
</div>
<blockquote
cite="mid:9656B9D10BC6124A88D5E27DD02422855BC48120@EX-TT-AC-01.traveltainment.int"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<div style="direction: ltr;font-family: Tahoma;color:
#000000;font-size: 10pt;">Hi,<br>
thanks for the answer, but i want to know the value of the
sessioin timeout (red) and the "isTokenExpired(X)" is for the
accessToken value (blue).<br>
<br>
<img moz-do-not-send="true"><br>
<br>
Is there a possibility to get this value (red) in Java Script ?<br>
<br>
<div style="font-family: Times New Roman; color: #000000;
font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF233634"><font
color="#000000" face="Tahoma" size="2"><b>Von:</b> Marek
Posolda [<a class="moz-txt-link-abbreviated" href="mailto:mposolda@redhat.com">mposolda@redhat.com</a>]<br>
<b>Gesendet:</b> Montag, 2. Februar 2015 23:14<br>
<b>Bis:</b> Christoph Machnik;
<a class="moz-txt-link-abbreviated" href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
<b>Betreff:</b> Re: [keycloak-user] Possibility to get the
keycloak session timeout value per Java-Script<br>
</font><br>
</div>
<div>
<div class="moz-cite-prefix">Hi, <br>
<br>
on keycloak.js there is function "isTokenExpired()" which
can be used to check if token is expired. You can also
give it an argument like "isTokenExpired(10)", which will
return true if token is expired *or* is going to expire in
next 10 seconds. Some more info in the docs: <a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://docs.jboss.org/keycloak/docs/1.1.0.Final/userguide/html/ch08.html#javascript-adapter"
target="_blank">
http://docs.jboss.org/keycloak/docs/1.1.0.Final/userguide/html/ch08.html#javascript-adapter</a><br>
<br>
Marek<br>
<br>
On 2.2.2015 13:09, Christoph Machnik wrote:<br>
</div>
<blockquote type="cite">
<style id="owaParaStyle" type="text/css">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
BODY {direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;}P {margin-top:0;margin-bottom:0;}BODY {scrollbar-base-color:undefined;scrollbar-highlight-color:undefined;scrollbar-darkshadow-color:undefined;scrollbar-track-color:undefined;scrollbar-arrow-color:undefined}</style>
<div style="direction:ltr; font-family:Tahoma;
color:#000000; font-size:10pt">Hi,<br>
<br>
I want to show an info, befoe the session runs in a
timeout, so that the user can react and not be logged
out. For this i need to read the session timeout that is
configuresd in the keycloak admin console. is there a
possibility to get the timeout value in javascript ?<br>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader" target="_blank"></fieldset>
<br>
<pre>_______________________________________________
keycloak-user mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a></pre>
</blockquote>
<br>
</div>
</div>
</div>
</blockquote>
<br>
</body>
</html>