0.0
No commit activity in last 3 years
No release in over 3 years
NYU libraries SSO client.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 10.0.3
~> 2.4.0
~> 1.9.0

Runtime

~> 0.2.9
~> 1.2.1
 Project Readme

<img src=“https://api.travis-ci.org/NYULibraries/authpds-nyu.png?branch=master” alt=“Build Status” /> <img src=“https://gemnasium.com/NYULibraries/authpds-nyu.png” alt=“Dependency Status” /> <img src=“https://codeclimate.com/github/NYULibraries/authpds-nyu.png” /> <img src=“https://coveralls.io/repos/NYULibraries/authpds-nyu/badge.png?branch=master” alt=“Coverage Status” />

AuthpdsNyu¶ ↑

Libraries for user authentication and authorization via NYU Libraries PDS system. It extends Authpds and provides NYU Libraries’ specific configuration.

Basics¶ ↑

Generate User-like model¶ ↑

$ rails generate model User username:string email:string firstname:string \
  lastname:string mobile_phone:string crypted_password:string password_salt:string \
  session_id:string persistence_token:string login_count:integer last_request_at:string \
  current_login_at:string last_login_at:string last_login_ip:string current_login_ip:string \
  user_attributes:text refreshed_at:datetime

Configure User-like model¶ ↑

class User < ActiveRecord::Base
  serialize :user_attributes

  acts_as_authentic do |c|
    c.validations_scope = :username
    c.validate_password_field = false
    c.require_password_confirmation = false
    c.disable_perishable_token_maintenance = true
  end
end

Generate UserSession model¶ ↑

$ rails generate authlogic:session UserSession

Configure UserSession with Authpds options¶ ↑

class UserSession < Authlogic::Session::Base
  pds_url "https://login.library.nyu.edu"
  redirect_logout_url "http://bobcat.library.nyu.edu"
  calling_system "nyu_system"
  anonymous true
end

Create UserSessions controller¶ ↑

$ rails generate controller UserSessions --no-assets --no-helper

Mixin authpds methods into UserSessionsController¶ ↑

class UserSessionsController < ApplicationController
  require 'authpds'
  include Authpds::Controllers::AuthpdsSessionsController
end

Mixin authpds methods into ApplicationController¶ ↑

class ApplicationController < ActionController::Base
  protect_from_forgery
  require 'authpds'
  include Authpds::Controllers::AuthpdsController
end

Overview¶ ↑

The module extends Authpds and should be compatible with Authpds configuation. It also provides hooks for custom functionality. The documentation below describes NYU specific config methods available.

Config Options Available¶ ↑

:opensso_url

Base OpenSSO url (login.nyu.edu:443/sso)

:aleph_url

Aleph url (aleph.library.nyu.edu)

:aleph_default_adm

Aleph default ADM (NYU50)

:aleph_default_sublibrary

Aleph default sublibrary (BOBST)