Sails AAF Rapid Connect
If you're using Sails.js, an even more rapid way of authenticating with AAF :)
Installation
Install the module in your Sails app:
$ npm install sails-aaf-rapid-connect --save
Create a service named 'userLoginService' with the following methods:
moduleexports = /** * payload - Object, AAF attributes, see RapidAAF documentation * req - Sails.js request object * res - Sails.js response object */ { // called when user is valid, you can do whatever you want, etc. // return res.redirect(url); } /** * reason - string * req - Sails.js request object * res - Sails.js response object */ { sailslog; return res; };
Add the following configuration:
auth: jwsSecret:'<The Secret used when registering the AAF Service>' algo: 'HS256' aaf: login_url:'<The Unique URL AAF provided after registering>'