trailsjs / sails-auth

Passport-based User Authentication system for sails.js applications. Designed to work well with the sails-permissions module.
https://www.npmjs.org/package/sails-auth
MIT License
265 stars 141 forks source link

Add new Delegated Authentication Protocol #160

Closed danielsharvey closed 7 years ago

danielsharvey commented 7 years ago

Authentication is delegated by the Strategy to an external provider but handled locally (e.g. makes request internally to external provider) unlike OAuth or similar which redirects to the external provider. On success the authenticated user is connected to a local user (created if necessary) in a similar manner to OAuth.

Add new POST route to support delegated authentication, which requires the ability to post a login form in a manner similar to the local protocol.

Add support for the info and status parameters of the passport.authenticate() callback method.

danielsharvey commented 7 years ago

For context, I have made these changes to use sails-auth with passport-atlassian-crowd2.

For reference, I've used a sample application to test.

See https://github.com/danielsharvey/sails-auth-crowd-sampleapp

Note that changes are also required to the passport-atlassian-crowd2 module; I have submitted a pull request there as well.

Thanks!