authlogic_rpx 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +4 -0
- data/README.rdoc +6 -6
- data/Rakefile +1 -1
- data/authlogic_rpx.gemspec +5 -5
- data/lib/authlogic_rpx/helper.rb +14 -20
- data/lib/authlogic_rpx/version.rb +1 -1
- metadata +3 -3
data/CHANGELOG.rdoc
CHANGED
data/README.rdoc
CHANGED
@@ -36,8 +36,8 @@ Three gems are required: authlogic, rpx_now, and authlogic_rpx. Install these as
|
|
36
36
|
|
37
37
|
Currently tested versions:
|
38
38
|
* authlogic 2.1.3,2.1.2,2.1.1
|
39
|
-
* rpx_now 0.6.11,0.6.6
|
40
|
-
* authlogic_rpx 1.1.
|
39
|
+
* rpx_now 0.6.12 (0.6.11,0.6.6 support is deprecated)
|
40
|
+
* authlogic_rpx 1.1.1
|
41
41
|
|
42
42
|
|
43
43
|
=== 1. Direct gem installation
|
@@ -52,8 +52,8 @@ Currently tested versions:
|
|
52
52
|
Include in config/environment.rb:
|
53
53
|
|
54
54
|
config.gem 'authlogic', :version => '>= 2.1.3'
|
55
|
-
config.gem 'rpx_now', :version => '>= 0.6.
|
56
|
-
config.gem 'authlogic_rpx', :version => '>= 1.1.
|
55
|
+
config.gem 'rpx_now', :version => '>= 0.6.12', :source => 'http://gemcutter.org'
|
56
|
+
config.gem 'authlogic_rpx', :version => '>= 1.1.1', :source => 'http://gemcutter.org'
|
57
57
|
|
58
58
|
Then to install, run from the command line:
|
59
59
|
|
@@ -65,8 +65,8 @@ Then to install, run from the command line:
|
|
65
65
|
Include in RAILS_ROOT/.gems:
|
66
66
|
|
67
67
|
authlogic --version '>= 2.1.3'
|
68
|
-
rpx_now --version '>= 0.6.
|
69
|
-
authlogic_rpx --version '>= 1.1.
|
68
|
+
rpx_now --version '>= 0.6.12' --source gemcutter.org
|
69
|
+
authlogic_rpx --version '>= 1.1.1' --source gemcutter.org
|
70
70
|
|
71
71
|
|
72
72
|
== About Authlogic_RPX
|
data/Rakefile
CHANGED
@@ -10,7 +10,7 @@ Echoe.new("authlogic_rpx") do |p|
|
|
10
10
|
p.summary = "Authlogic plug-in for RPX support"
|
11
11
|
p.description = "Authlogic extension/plugin that provides RPX (rpxnow.com) authentication support"
|
12
12
|
|
13
|
-
p.runtime_dependencies = ["authlogic >=2.1.3", "rpx_now >=0.6.
|
13
|
+
p.runtime_dependencies = ["authlogic >=2.1.3", "rpx_now >=0.6.12" ]
|
14
14
|
p.development_dependencies = []
|
15
15
|
|
16
16
|
p.author = "Paul Gallagher / tardate"
|
data/authlogic_rpx.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{authlogic_rpx}
|
5
|
-
s.version = "1.1.
|
5
|
+
s.version = "1.1.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"]
|
9
|
-
s.date = %q{2010-01-
|
9
|
+
s.date = %q{2010-01-17}
|
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/rpx_identifier.rb", "lib/authlogic_rpx/session.rb", "lib/authlogic_rpx/version.rb"]
|
@@ -26,13 +26,13 @@ Gem::Specification.new do |s|
|
|
26
26
|
|
27
27
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
28
28
|
s.add_runtime_dependency(%q<authlogic>, [">= 2.1.3"])
|
29
|
-
s.add_runtime_dependency(%q<rpx_now>, [">= 0.6.
|
29
|
+
s.add_runtime_dependency(%q<rpx_now>, [">= 0.6.12"])
|
30
30
|
else
|
31
31
|
s.add_dependency(%q<authlogic>, [">= 2.1.3"])
|
32
|
-
s.add_dependency(%q<rpx_now>, [">= 0.6.
|
32
|
+
s.add_dependency(%q<rpx_now>, [">= 0.6.12"])
|
33
33
|
end
|
34
34
|
else
|
35
35
|
s.add_dependency(%q<authlogic>, [">= 2.1.3"])
|
36
|
-
s.add_dependency(%q<rpx_now>, [">= 0.6.
|
36
|
+
s.add_dependency(%q<rpx_now>, [">= 0.6.12"])
|
37
37
|
end
|
38
38
|
end
|
data/lib/authlogic_rpx/helper.rb
CHANGED
@@ -7,11 +7,12 @@ module AuthlogicRpx
|
|
7
7
|
# * <tt>return_url:</tt> url for the RPX callback (e.g. user_sessions_url)
|
8
8
|
# * <tt>add_rpx:</tt> if true, requests RPX callback to add to current session. Else runs normal authentication process (default)
|
9
9
|
#
|
10
|
+
# The options hash may include other options as supported by rpx_now (see http://github.com/grosser/rpx_now)
|
11
|
+
#
|
10
12
|
def rpx_embed(options = {})
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
RPXNow.embed_code(options[:app_name], u( options[:return_url] + '?' + params ) )
|
13
|
+
app_name = options.delete( :app_name )
|
14
|
+
token_url = build_token_url!( options )
|
15
|
+
RPXNow.embed_code(app_name, token_url, options )
|
15
16
|
end
|
16
17
|
|
17
18
|
# helper to insert a link to pop-up RPX login
|
@@ -26,25 +27,18 @@ module AuthlogicRpx
|
|
26
27
|
#
|
27
28
|
def rpx_popup(options = {})
|
28
29
|
options = { :unobtrusive => true, :add_rpx => false }.merge( options )
|
29
|
-
unobtrusive = options[:unobtrusive]
|
30
|
-
add_rpx = options.delete( :add_rpx )
|
31
30
|
app_name = options.delete( :app_name )
|
32
31
|
link_text = options.delete( :link_text )
|
33
|
-
|
34
|
-
|
35
|
-
).compact.join('&')
|
36
|
-
|
37
|
-
# as of rpx_now 0.6.11, there is still an issue with url-encoding of the return path containing additional parameters
|
38
|
-
# (as we are using here to get the form_authenticity_token returned.
|
39
|
-
# To get around this, we need to ensure hrefs are url-encoded,
|
40
|
-
# while the link provided to the rpx_now javascript popup should _not_ be url-encoded
|
41
|
-
if unobtrusive
|
42
|
-
RPXNow.popup_code( link_text, app_name, u( return_url ), options )
|
43
|
-
else
|
44
|
-
RPXNow.popup_code( link_text, app_name, u( return_url ), options.merge( :unobtrusive => true ) ) +
|
45
|
-
RPXNow.popup_source(app_name, return_url, options )
|
46
|
-
end
|
32
|
+
token_url = build_token_url!( options )
|
33
|
+
RPXNow.popup_code( link_text, app_name, token_url, options )
|
47
34
|
end
|
48
35
|
|
36
|
+
private
|
37
|
+
|
38
|
+
def build_token_url!( options )
|
39
|
+
options.delete( :return_url ) + '?' + (
|
40
|
+
{ :authenticity_token => form_authenticity_token, :add_rpx => options.delete( :add_rpx ) }.collect { |n| "#{n[0]}=#{ u(n[1]) }" if n[1] }
|
41
|
+
).compact.join('&')
|
42
|
+
end
|
49
43
|
end
|
50
44
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authlogic_rpx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Gallagher / tardate
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-01-
|
12
|
+
date: 2010-01-17 00:00:00 +08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.6.
|
33
|
+
version: 0.6.12
|
34
34
|
version:
|
35
35
|
description: Authlogic extension/plugin that provides RPX (rpxnow.com) authentication support
|
36
36
|
email: gallagher.paul@gmail.com
|