[keycloak-dev] NodeJS get token directly

Addam Martin addam.martin at web-presence-in-china.com
Fri Jan 15 02:35:50 EST 2016


Hi,
I am working on a NodeJS Express application using bearer only authentication with Keycloak. It contains a REST API for use by other applications.


Up until now I have been using the Keycloak Connect middleware to secure my POST method, which is a great solution for basic authentication as is almost completely takes it out of the hands of the developer. However, now I need to be able to get a token directly and keep it for a given duration, say 15 minutes, for use by multiple connecting clients.


This token will be used by multiple applications connecting via this REST API, possibly in very quick succession. It needs to be possible to verify that the token is still valid synchronously on the fly, renewing it if required. Is there anything perhaps in the "keycloak-auth-utils" npm package which can get used to handle this? Or any other existing libraries?


Thanks,

Addam.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-dev/attachments/20160115/a05b5064/attachment.html 


More information about the keycloak-dev mailing list