var Book = mongoose.model('Book', BookSchema); // ========================================================= // = // = SET UP CAS (FOR YALE USER AUTHENTICATION) // = cas.configure({ casHost: "secure.its.yale.edu", // required ssl: true, // default false, Yale requires true service: 'https://' + hostname + '/', // Absolute URL to where cas.bouncer should take you after successful login. redirectUrl: '/about', // the route that cas.blocker will send to if not authed. Defaults to '/' sessionName: 'username' // get the netID from request.session.whatever - cas_user by default. }); // ========================================================= // = // = WEB ROUTES // = // HOME PAGE // /
var cas = require('grand_master_cas'); cas.configure({ casHost: process.env.CAS_HOST, casPath: process.env.CAS_PATH, ssl: true, service: process.env.CAS_SERVICE_URL, sessionName: "cas_user", // the cas user_name will be at req.session.cas_user (this is the default) renew: false, // true or false, false is the default redirectUrl: '/' // the route that cas.blocker will send to if not authed. Defaults to '/' }); module.exports = cas;