authpds 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +39 -0
- data/lib/authpds/institution.rb +2 -2
- data/lib/authpds/version.rb +1 -1
- metadata +75 -87
data/README.rdoc
CHANGED
@@ -39,6 +39,45 @@ This gem provides a mechanism for authenticating via Ex Libris' Patron Directory
|
|
39
39
|
=== Create UserSessions controller
|
40
40
|
$ rails generate controller UserSessions --no-assets --no-helper
|
41
41
|
|
42
|
+
=== Configure institutions
|
43
|
+
|
44
|
+
==== Create institutions.yml file
|
45
|
+
|
46
|
+
Calling the institution "default" will make it the default:
|
47
|
+
|
48
|
+
default:
|
49
|
+
login:
|
50
|
+
link_code: INST01
|
51
|
+
display_name: My Institution
|
52
|
+
|
53
|
+
An alternative syntax:
|
54
|
+
|
55
|
+
INST01:
|
56
|
+
login:
|
57
|
+
link_code: INST01
|
58
|
+
default: true
|
59
|
+
display_name: My Institution
|
60
|
+
|
61
|
+
You can create multiple institution listings as follows:
|
62
|
+
|
63
|
+
INST01:
|
64
|
+
login:
|
65
|
+
link_code: INST01
|
66
|
+
default: true
|
67
|
+
display_name: My Institution
|
68
|
+
INST02:
|
69
|
+
login:
|
70
|
+
link_code: INST01
|
71
|
+
display_name: Your Institution
|
72
|
+
|
73
|
+
The two separate institutions above share a link_code in this example. The link_code attribute determines the institute parameter in the PDS url.
|
74
|
+
|
75
|
+
==== Create institution initializer
|
76
|
+
|
77
|
+
If you have your institutions.yml file in another location make sure to change the line below accordingly.
|
78
|
+
|
79
|
+
InstitutionList.yaml_path= Rails.root + "config/institutions.yml"
|
80
|
+
|
42
81
|
=== Mixin authpds methods into UserSessionsController
|
43
82
|
class UserSessionsController < ApplicationController
|
44
83
|
require 'authpds'
|
data/lib/authpds/institution.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
class Institution < Struct.new(:display_name, :name, :default,
|
2
|
-
:
|
1
|
+
class Institution < Struct.new(:display_name, :name, :default, :parent_institution,
|
2
|
+
:ip_addresses, :login, :layouts, :views, :controllers, :models)
|
3
3
|
require 'ipaddr'
|
4
4
|
|
5
5
|
# Better initializer than Struct gives us, take a hash instead
|
data/lib/authpds/version.rb
CHANGED
metadata
CHANGED
@@ -1,91 +1,88 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: authpds
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 1
|
9
|
-
- 1
|
10
|
-
version: 0.1.1
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Scot Dalton
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-09-24 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
22
15
|
name: rails
|
23
|
-
|
24
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
25
17
|
none: false
|
26
|
-
requirements:
|
18
|
+
requirements:
|
27
19
|
- - ~>
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
hash: 15
|
30
|
-
segments:
|
31
|
-
- 3
|
32
|
-
- 2
|
33
|
-
- 0
|
20
|
+
- !ruby/object:Gem::Version
|
34
21
|
version: 3.2.0
|
35
22
|
type: :runtime
|
36
|
-
version_requirements: *id001
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
name: authlogic
|
39
23
|
prerelease: false
|
40
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
25
|
none: false
|
42
|
-
requirements:
|
43
|
-
- -
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 3.2.0
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: authlogic
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
49
38
|
type: :runtime
|
50
|
-
version_requirements: *id002
|
51
|
-
- !ruby/object:Gem::Dependency
|
52
|
-
name: nokogiri
|
53
39
|
prerelease: false
|
54
|
-
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
55
41
|
none: false
|
56
|
-
requirements:
|
57
|
-
- -
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: nokogiri
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
63
54
|
type: :runtime
|
64
|
-
version_requirements: *id003
|
65
|
-
- !ruby/object:Gem::Dependency
|
66
|
-
name: sqlite3
|
67
55
|
prerelease: false
|
68
|
-
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
69
57
|
none: false
|
70
|
-
requirements:
|
71
|
-
- -
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: sqlite3
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
77
70
|
type: :development
|
78
|
-
|
79
|
-
|
80
|
-
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
description: Libraries that use Ex Libris products, can integrate Rails application
|
79
|
+
with PDS to provide single sign-on across systems.
|
80
|
+
email:
|
81
81
|
- scotdalton@gmail.com
|
82
82
|
executables: []
|
83
|
-
|
84
83
|
extensions: []
|
85
|
-
|
86
84
|
extra_rdoc_files: []
|
87
|
-
|
88
|
-
files:
|
85
|
+
files:
|
89
86
|
- lib/authpds/acts_as_authentic.rb
|
90
87
|
- lib/authpds/controllers/authpds_controller.rb
|
91
88
|
- lib/authpds/controllers/authpds_sessions_controller.rb
|
@@ -113,41 +110,32 @@ files:
|
|
113
110
|
- test/unit/pds_test.rb
|
114
111
|
- test/unit/user_session_test.rb
|
115
112
|
- test/unit/user_test.rb
|
116
|
-
has_rdoc: true
|
117
113
|
homepage: http://github.com/scotdalton/authpds
|
118
114
|
licenses: []
|
119
|
-
|
120
115
|
post_install_message:
|
121
116
|
rdoc_options: []
|
122
|
-
|
123
|
-
require_paths:
|
117
|
+
require_paths:
|
124
118
|
- lib
|
125
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
119
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
126
120
|
none: false
|
127
|
-
requirements:
|
128
|
-
- -
|
129
|
-
- !ruby/object:Gem::Version
|
130
|
-
|
131
|
-
|
132
|
-
- 0
|
133
|
-
version: "0"
|
134
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ! '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
135
126
|
none: false
|
136
|
-
requirements:
|
137
|
-
- -
|
138
|
-
- !ruby/object:Gem::Version
|
139
|
-
|
140
|
-
segments:
|
141
|
-
- 0
|
142
|
-
version: "0"
|
127
|
+
requirements:
|
128
|
+
- - ! '>='
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '0'
|
143
131
|
requirements: []
|
144
|
-
|
145
132
|
rubyforge_project:
|
146
|
-
rubygems_version: 1.
|
133
|
+
rubygems_version: 1.8.24
|
147
134
|
signing_key:
|
148
135
|
specification_version: 3
|
149
|
-
summary: Allows applications to use Ex Libris' Patron Directory Service (PDS) for
|
150
|
-
|
136
|
+
summary: Allows applications to use Ex Libris' Patron Directory Service (PDS) for
|
137
|
+
authentication.
|
138
|
+
test_files:
|
151
139
|
- test/authpds_test.rb
|
152
140
|
- test/fixtures/users.yml
|
153
141
|
- test/support/config/institutions.yml
|