tardate-authlogic_rpx 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +6 -0
- data/Manifest +1 -0
- data/README.rdoc +7 -5
- data/authlogic_rpx.gemspec +2 -2
- data/lib/authlogic_rpx/session.rb +2 -2
- data/lib/authlogic_rpx/version.rb +1 -1
- metadata +2 -2
data/CHANGELOG.rdoc
CHANGED
data/Manifest
CHANGED
data/README.rdoc
CHANGED
@@ -35,7 +35,7 @@ Three gems are required: authlogic, grosser-rpx_now, and tardate-authlogic_rpx.
|
|
35
35
|
Currently tested versions:
|
36
36
|
* authlogic 2.1.1
|
37
37
|
* grosser-rpx_now 0.5.10
|
38
|
-
* tardate-authlogic_rpx 1.0.
|
38
|
+
* tardate-authlogic_rpx 1.0.1
|
39
39
|
|
40
40
|
|
41
41
|
=== 1. Direct gem installation
|
@@ -171,9 +171,12 @@ If you have other fields you want to map, you can provide your own implementatio
|
|
171
171
|
# see https://rpxnow.com/docs#profile_data for the definition of available attributes
|
172
172
|
#
|
173
173
|
def map_rpx_data
|
174
|
-
|
175
|
-
|
176
|
-
|
174
|
+
# map core profile data using authlogic indirect column names
|
175
|
+
self.attempted_record.send("#{klass.login_field}=", @rpx_data['profile']['preferredUsername'] ) if attempted_record.send(klass.login_field).blank?
|
176
|
+
self.attempted_record.send("#{klass.email_field}=", @rpx_data['profile']['email'] ) if attempted_record.send(klass.email_field).blank?
|
177
|
+
|
178
|
+
# map some other columns explicityl
|
179
|
+
self.attempted_record.fullname = @rpx_data['profile']['displayName'] if attempted_record.fullname.blank?
|
177
180
|
|
178
181
|
if rpx_extended_info?
|
179
182
|
# map some extended attributes
|
@@ -182,7 +185,6 @@ If you have other fields you want to map, you can provide your own implementatio
|
|
182
185
|
|
183
186
|
end
|
184
187
|
|
185
|
-
|
186
188
|
=== 4. Add application controller helpers: current_user, current_user_session
|
187
189
|
|
188
190
|
We'll add current_user and current_user_session helpers. These can then be used in controllers and views to get a handle on the "current" logged in user.
|
data/authlogic_rpx.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{authlogic_rpx}
|
5
|
-
s.version = "1.0.
|
5
|
+
s.version = "1.0.1"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Paul Gallagher / tardate"]
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.description = %q{Authlogic extension/plugin that provides RPX (rpxnow.com) authentication support}
|
11
11
|
s.email = %q{gallagher.paul@gmail.com}
|
12
12
|
s.extra_rdoc_files = ["CHANGELOG.rdoc", "README.rdoc", "lib/authlogic_rpx.rb", "lib/authlogic_rpx/acts_as_authentic.rb", "lib/authlogic_rpx/helper.rb", "lib/authlogic_rpx/session.rb", "lib/authlogic_rpx/version.rb"]
|
13
|
-
s.files = ["CHANGELOG.rdoc", "MIT-LICENSE", "Manifest", "README.rdoc", "Rakefile", "init.rb", "lib/authlogic_rpx.rb", "lib/authlogic_rpx/acts_as_authentic.rb", "lib/authlogic_rpx/helper.rb", "lib/authlogic_rpx/session.rb", "lib/authlogic_rpx/version.rb", "rails/init.rb", "test/acts_as_authentic_test.rb", "test/fixtures/users.yml", "test/libs/rails_trickery.rb", "test/libs/user.rb", "test/libs/user_session.rb", "test/session_test.rb", "test/test_helper.rb"
|
13
|
+
s.files = ["CHANGELOG.rdoc", "MIT-LICENSE", "Manifest", "README.rdoc", "Rakefile", "authlogic_rpx.gemspec", "init.rb", "lib/authlogic_rpx.rb", "lib/authlogic_rpx/acts_as_authentic.rb", "lib/authlogic_rpx/helper.rb", "lib/authlogic_rpx/session.rb", "lib/authlogic_rpx/version.rb", "rails/init.rb", "test/acts_as_authentic_test.rb", "test/fixtures/users.yml", "test/libs/rails_trickery.rb", "test/libs/user.rb", "test/libs/user_session.rb", "test/session_test.rb", "test/test_helper.rb"]
|
14
14
|
s.homepage = %q{http://github.com/tardate/authlogic_rpx}
|
15
15
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Authlogic_rpx", "--main", "README.rdoc"]
|
16
16
|
s.require_paths = ["lib"]
|
@@ -167,8 +167,8 @@ module AuthlogicRpx
|
|
167
167
|
# see https://rpxnow.com/docs#profile_data for the definition of available attributes
|
168
168
|
#
|
169
169
|
def map_rpx_data
|
170
|
-
self.attempted_record.
|
171
|
-
self.attempted_record.
|
170
|
+
self.attempted_record.send("#{klass.login_field}=", @rpx_data['profile']['preferredUsername'] ) if attempted_record.send(klass.login_field).blank?
|
171
|
+
self.attempted_record.send("#{klass.email_field}=", @rpx_data['profile']['email'] ) if attempted_record.send(klass.email_field).blank?
|
172
172
|
end
|
173
173
|
|
174
174
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tardate-authlogic_rpx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Gallagher / tardate
|
@@ -52,6 +52,7 @@ files:
|
|
52
52
|
- Manifest
|
53
53
|
- README.rdoc
|
54
54
|
- Rakefile
|
55
|
+
- authlogic_rpx.gemspec
|
55
56
|
- init.rb
|
56
57
|
- lib/authlogic_rpx.rb
|
57
58
|
- lib/authlogic_rpx/acts_as_authentic.rb
|
@@ -66,7 +67,6 @@ files:
|
|
66
67
|
- test/libs/user_session.rb
|
67
68
|
- test/session_test.rb
|
68
69
|
- test/test_helper.rb
|
69
|
-
- authlogic_rpx.gemspec
|
70
70
|
has_rdoc: false
|
71
71
|
homepage: http://github.com/tardate/authlogic_rpx
|
72
72
|
licenses:
|