Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@byu-oit/byu-cas

Package Overview
Dependencies
Maintainers
12
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@byu-oit/byu-cas

CAS tools specific to Brigham Young University, Provo

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
19
increased by35.71%
Maintainers
12
Weekly downloads
 
Created
Source

BYU-CAS

Examples

Validating a ticket

var cas = require('byu-cas');

var ticket = doSomethingToGetTicket();
var service = 'http://example.com/signin';

cas.validate(ticket, service).then(function success(response) {
  console.log("Ticket valid! Hello, " + response.username);
  console.dir(response.attributes);
}).catch(function error(e) {
  console.log("Invalid ticket. Error message was: " + e.message);
});

Retrieving a CAS ticket

Note: this is removed in version 2.0.0 except when the environment variable INSECURE is set. @agrasley has a good explanation of the risks involved when using this function.

var cas = require('byu-cas');
var service = 'http://example.com/signin';

cas.getTicket('username', 'password', service)
.then(function(ticket){
  // do something with the ticket
});

Attributes come back in the following format

{ restOfName: 'Peter Oliver',
  activeParttimeNonBYUEmployee: false,
  activeParttimeInstructor: false,
  inactiveFulltimeEmployee: false,
  surname: 'Rabbit',
  activeFulltimeInstructor: false,
  memberOf: [],
  preferredFirstName: 'Peter',
  sortName: 'Rabbit, Peter Oliver',
  activeFulltimeNonBYUEmployee: false,
  inactiveParttimeNonBYUEmployee: false,
  organization: false,
  activeEligibletoRegisterStudent: false,
  name: 'Peter Rabbit',
  preferredSurname: false,
  personId: '611290592',
  inactiveParttimeInstructor: false,
  netId: 'prabbit',
  inactiveFulltimeNonBYUEmployee: false,
  byuId: '872643180',
  restricted: false,
  emailAddress: 'prabbitbyu@sharklasers.com',
  alumni: false,
  inactiveParttimeEmployee: false,
  inactiveFulltimeInstructor: false,
  activeFulltimeEmployee: false,
  fullName: 'Peter Oliver Rabbit IV',
  activeParttimeEmployee: false }

Contributing

We're pretty lax, but

  • New features must come with an appropriate test
  • New features should have an example in README.md
  • Pull requests will generally not be merged if they break tests
  • Use two spaces per indent

Keywords

FAQs

Package last updated on 06 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc