npm.io
0.4.9 • Published 12 years ago

casable

Licence
Version
0.4.9
Deps
1
Vulns
1
Weekly
0
Stars
17.6K

Casable

This project will be the Casable Project to enable NodeJS express applications to authenticate using CAS.

Useage:

var cas = require('casable');
var auth = cas.authentication('http://cas.tw.com/cas', {logoutPath:'/unsecure', casVersion:'2.0'});

app.get('/securePage', auth, function(request, response) {
  var username = request.authenticatedUser.id
  response.send(username + "
Logout"); });

Simply define a URL like this for logout functionality

app.get('/logout', auth, function(request, response) {
});

Make sure that these session and cookie routes are enabled

app.use(express.cookieParser());
app.use(express.session({secret: 'abcxyz'}));

Todo

Make Casable work with HTTPS

Keywords