Skip to content

Commit

Permalink
Add info about configuring for cas2 to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartf committed Aug 19, 2014
1 parent ba6f1b9 commit 75b408e
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,28 @@ Here is how you can use them:
});
}));

## CAS 2.0 configuration
CAS 2.0 will work with the CAS 3.0 configuration, but you need to set the validation endpoint.

passport.use(new (require('passport-cas').Strategy)({
version: 'CAS3.0',
ssoBaseURL: 'http://www.example.com/',
serverBaseURL: 'http://localhost:3000/cas',
validateURL: '/serviceValidate'
}, function(profile, done) {
var login = profile.user;

User.findOne({login: login}, function (err, user) {
if (err) {
return done(err);
}
if (!user) {
return done(null, false, {message: 'Unknown user'});
}
return done(null, user);
});
}));

## License

[The MIT License](http://opensource.org/licenses/MIT)

0 comments on commit 75b408e

Please sign in to comment.