OpenStack Keystone authentication strategy for Passport and Node.js
npm install passport-keystone
Check out the live demo, source code here, to see an express app configured for authentication with the Rackspace Cloud Identity Service, an implementation of OpenStack Keystone Service. Also included in the example is the Proxy-Keystone middleware, a simple proxy for keystone service catalog endpoints.
The keystone authentication strategy authenticates users using a username and
password from the POST body. The strategy requires a
verify callback, which accepts these
credentials and calls
done providing a user that is attached to
The following example uses
passReqToCallback to send the
req object to next callback, where session expiration can be configured.
passport.authenticate(), specifying the
'keystone' strategy, to
Example form markup
Example request via curl
curl -v -d "username=bob&password=secret" http://127.0.0.1:3000/login
Checkout Passportjs.org for more authentication examples.