Skip to content
UTEP SingleSignOn Authentication for Ruby
Ruby
Branch: master
Clone or download
Latest commit b4648ce Jan 22, 2017

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib Fix weird spacing issues in file Mar 24, 2015
.DS_Store Add uncommitted files Dec 15, 2014
.gitignore Update usage in readme Dec 16, 2014
Gemfile Change gem name to utep_sso Dec 15, 2014
LICENSE.txt Change gem name to utep_sso Dec 15, 2014
README.md Update README.md Jan 22, 2017
Rakefile Change gem name to utep_sso Dec 15, 2014
utep_sso.gemspec Update readme and gemspec Dec 16, 2014

README.md

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
You can’t perform that action at this time.