Code Monkey home page Code Monkey logo

meteor-accounts-cas's Introduction

This is a merged repository of useful forks of: atoy40:accounts-cas

((https://atmospherejs.com/atoy40/accounts-cas)

Essential improvements to atoy40 version

  • Added support of "redirect" instead of "popup window" (disable the popup window)
  • Use xmlparser instead of newline parsing

Install

cd ~site
mkdir packages
cd packages
git clone https://github.com/xaionaro/meteor-accounts-cas
cd ~site
meteor add xaionaro:accounts-cas

Usage

Put CAS settings in Meteor.settings (for example using METEOR_SETTINGS env or --settings) like so:

If casVersion is not defined, it will assume you use CAS 1.0. (note by xaionaro: option casVersion seems to be just ignored in the code, ATM).

This package depends on NPM node-cas https://github.com/anrizal/node-cas which is forked from https://github.com/kcbanner/node-cas There is a pull-request to https://github.com/kcbanner/node-cas. If the pull-request accepted, anrizal promised to will change the dependency in his fork.

Server side settings:

Meteor.settings = {
	"cas": {
		"validateUrl": "https://cas.example.com/serviceValidate",
		"autoClose": true,
		"casVersion": 2.0,
		"popup": true,
	}
}

Client side settings:

Meteor.settings = {
	"public": {
		"cas": {
			"loginUrl": "https://cas.example.com/login",
			"serviceParam": "service",
			"popupWidth": 810,
			"popupHeight": 610,
			"popup": true,
		}
	}
}

proxyUrl is not required. Setup ROOT_URL environment variable instead.

Then, to start authentication, you have to call the following method from the client (for example in a click handler) :

Meteor.loginWithCas([callback]);

It must open a popup containing you CAS login form or redirect to the CAS login form (depending on "popup" setting).

If popup is disabled (== false), then it's required to execute Meteor.initCas([callback]) in Meteor.startup of the client side. ATM, Meteor.initCas() completes authentication.

Examples

meteor-accounts-cas's People

Contributors

atoy40 avatar ay13 avatar eskan avatar vnorguet avatar xaionaro avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  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.