[keycloak-user] Possibility to get the keycloak session timeout value per Java-Script

Christoph Machnik christoph.machnik at traveltainment.de
Tue Feb 3 04:59:40 EST 2015


Hi,
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).

[X]

Is there a possibility to get this value (red) in Java Script ?

________________________________
Von: Marek Posolda [mposolda at redhat.com]
Gesendet: Montag, 2. Februar 2015 23:14
Bis: Christoph Machnik; keycloak-user at lists.jboss.org
Betreff: Re: [keycloak-user] Possibility to get the keycloak session timeout value per Java-Script

Hi,

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: http://docs.jboss.org/keycloak/docs/1.1.0.Final/userguide/html/ch08.html#javascript-adapter

Marek

On 2.2.2015 13:09, Christoph Machnik wrote:
Hi,

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 ?




_______________________________________________
keycloak-user mailing list
keycloak-user at lists.jboss.org<mailto: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/20150203/63a9a686/attachment.html 


More information about the keycloak-user mailing list