Project

utep_sso

0.0
No commit activity in last 3 years
No release in over 3 years
Fetch user information using UTEP's Single Sign On service
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 10.0

Runtime

~> 2.8.0
 Project Readme

UTEP SingleSignOn for Ruby

Authenticate users using UTEP's SingleSignOn

Installation

Add this line to your application's Gemfile:

gem 'utep_sso'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install utep_sso

Usage

require 'utep_sso'


# Check if a user is signed in
UTEPSSO.authenticated?(cookies[:UTEP_SE], cookies[:UTEP_SA])

# Authenticate a user using UTEP cookies (will return nil values in the hash for invalid cookies)
UTEPSSO.authenticate(cookies[:UTEP_SE], cookies[:UTEP_SA])
# => {:user_name, :full_name, :email_address, :authenticated, :role_value, :external_user, :@xmlns}

# roles are returned as a bit mask
#  000010 = faculty
#  000100 = staff
#  010000 = student

#  010110 = user that is a student, faculty and staff 

# Deauthenticate a user
UTEPSSO.deauthenticate(cookies[:UTEP_SE], cookies[:UTEP_SA])

Contributing

  1. Fork it ( https://github.com/awernick/utep_sso/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request