Skip to content

tsy77/koa-cas-authentication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

npm install koa-authentication

Document

This library is based on cas-authentication, and the interface is the same. You can refer to that documwnt.

Usage

// variable declaration
const CasAuthentication = require('koa2-cas-authentication');

const casConfig = require('../config/cas');

const cas = new CasAuthentication(Object.assign(casConfig, {
    session_info: 'user',
    session_name: 'username'
}));

...
// controller code
const isLogin = await cas.bounce(ctx);

if (isLogin) {
    await ctx.render('index');
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published