lib/authpds-nyu/session.rb in authpds-nyu-0.0.7 vs lib/authpds-nyu/session.rb in authpds-nyu-0.0.8
- old
+ new
@@ -59,10 +59,15 @@
httponly true
secure true
login_inaccessible_url "http://library.nyu.edu/errors/login-library-nyu-edu/"
end
end
+
+ # Override logout url for NYU.
+ def logout_url
+ return "#{self.class.pds_url}/logout?url=#{CGI::escape(controller.user_session_redirect_url(self.class.redirect_logout_url))}"
+ end
def aleph_bor_auth_permissions(bor_id=nil, verification=nil, adm=nil, sublibrary=nil)
bor_auth = aleph_bor_auth(bor_id, verification, adm, sublibrary)
return (bor_auth.nil? or bor_auth.error) ? {} : bor_auth.permissions
end
@@ -73,11 +78,11 @@
aleph_url = self.class.aleph_url
adm = self.class.aleph_default_adm if adm.nil?
sublibrary = self.class.aleph_default_sublibrary if sublibrary.nil?
# Call X-Service
bor_auth =
- AuthPdsNyu::Exlibris::Aleph::BorAuth.
- new(aleph_url, adm, sublibrary, "N", bor_id, bor_verification)
+ Exlibris::Aleph::BorAuth.
+ new(aleph_url, adm, sublibrary, "N", bor_id, verification)
controller.logger.error(
"Error in #{self.class}. "+
"No permissions returned from Aleph bor-auth for user with bor_id #{bor_id}."+
"Error: #{(bor_auth.nil?) ? "bor_auth is nil." : bor_auth.error.inspect}"
) and return nil if bor_auth.nil? or bor_auth.error
\ No newline at end of file