Giter VIP home page Giter VIP logo

egg-cas's Introduction

egg-cas2

config.default.js

  config.cas = {
		ignore: [], //忽略地址, 优先级比match低
		match: [], //需要匹配的地址
		clientOrigin: '', //单点客户端服务器域名, 比如httsp://127.0.0.1:8080
		serverOrigin: '', //单点中心服务器域名, 比如https://www.casserver.com
		paths: {
			clientValidate: '/cas/validate', //单点客户端对单点服务器输出的servicer地址参数,例如`${serverOrigin + login}?service=${encodeURIComponent(clientOrigin + clientValidate)}`
			serverValidate: '/serviceValidate', //单点服务器验证票据Ticket的路径
			login: '/login', //登陆路径
			logout: '/logout', //登出路径
		},
		fromAjax: {
			header: 'X-Requested-With', 
			status: 200,
		},
};

plugin.js

exports.cas = {
  enable: true,
  package: 'egg-cas2'
}

router

  //logout
  router.get('/logout', app.cas.logout());

  //login
  router.get('/login', app.cas.login());

egg-cas's People

Contributors

schoeu avatar xiaoshuimao avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.