@rula/feathers-authentication-cas

2.0.0 • Public • Published

A Central Authentication Service (CAS) strategy for @feathersjs/authentication using Passport.

Installation

npm install @rula/feathers-authentication-cas --save

Note: This is only compatible with feathers-authentication^1.x.

Example

const feathers = require('@feathersjs/feathers');
const authentication = require('feathers-authentication');
const jwt = require('feathers-authentication-jwt');
const cas = require('@rula/feathers-authentication-cas');

const app = feathers();

//Setup authentication
app.configure(authentication(settings));
app.configure(jwt());
app.configure(cas({
  casUrl: "https://cas.example.com",
  serviceBaseUrl: "http://localhost:8080",
  servicePath: "/login/validate",
  version: "3.0",
  useSAML: false,
  path: "/login",
  failureRedirect: "/login",
  successRedirect: "/",
  propertyMap: {
    isFromNewLogin: "newLogin",
    longTermAuthenticationRequestTokenUsed: "longAuth"
  }
}));

Now starting the test server npm start and opening a browser to localhost:8080/login should redirect to your CAS login provider. Upon successful login, you will be redirected back to / while being logged in and any futher page authentication can be done with the JWT.

License

Copyright (c) 2018

Licensed under the MIT license

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.0.00latest

Version History

VersionDownloads (Last 7 Days)Published
2.0.00

Package Sidebar

Install

npm i @rula/feathers-authentication-cas

Weekly Downloads

0

Version

2.0.0

License

MIT

Unpacked Size

35.2 kB

Total Files

16

Last publish

Collaborators

  • daqst