File tree 1 file changed +22
-0
lines changed
1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,28 @@ Here is how you can use them:
96
96
});
97
97
}));
98
98
99
+ ## CAS 2.0 configuration
100
+ CAS 2.0 will work with the CAS 3.0 configuration, but you need to set the validation endpoint.
101
+
102
+ passport.use(new (require('passport-cas').Strategy)({
103
+ version: 'CAS3.0',
104
+ ssoBaseURL: 'http://www.example.com/',
105
+ serverBaseURL: 'http://localhost:3000/cas',
106
+ validateURL: '/serviceValidate'
107
+ }, function(profile, done) {
108
+ var login = profile.user;
109
+
110
+ User.findOne({login: login}, function (err, user) {
111
+ if (err) {
112
+ return done(err);
113
+ }
114
+ if (!user) {
115
+ return done(null, false, {message: 'Unknown user'});
116
+ }
117
+ return done(null, user);
118
+ });
119
+ }));
120
+
99
121
## License
100
122
101
123
[ The MIT License] ( http://opensource.org/licenses/MIT )
You can’t perform that action at this time.
0 commit comments