Skip to content

githbq/koa-cas

Repository files navigation

项目描述

my love

用法

    const CAS = require('koa-cas');
    const cas = new CAS({
        baseUrl: 'https://sso.xx.com:8888/sso', 
        service: 'http://localhost:3000/',
        secureSSL: false,
    });

Using it in a login route:

    exports.casLogin = function * () {
        let ticket = this.params.ticket;
        
        if(!ticket){
            return this.redirect('/');
        }
        
        this.body = yield cas.validate(ticket);
    };

Releases

No releases published

Packages

No packages published