authlogic_rpx 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,7 @@
1
+ == 1.1.1 released 2010-01-17
2
+
3
+ * updated gem support to rpx_now 0.6.12 (includes url encoding fix)
4
+
1
5
  == 1.1.0 released 2010-01-05
2
6
 
3
7
  * added identity mapping and merging support [GH#10,GH#13]
@@ -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.0
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.11', :source => 'http://gemcutter.org'
56
- config.gem 'authlogic_rpx', :version => '>= 1.1.0', :source => 'http://gemcutter.org'
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.11' --source gemcutter.org
69
- authlogic_rpx --version '>= 1.1.0' --source gemcutter.org
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.11" ]
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"
@@ -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.0"
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-05}
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.11"])
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.11"])
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.11"])
36
+ s.add_dependency(%q<rpx_now>, [">= 0.6.12"])
37
37
  end
38
38
  end
@@ -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
- params = (
12
- { :authenticity_token => form_authenticity_token, :add_rpx => options[:add_rpx] }.collect { |n| "#{n[0]}=#{ u(n[1]) }" if n[1] }
13
- ).compact.join('&')
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
- return_url = options.delete( :return_url ) + '?' + (
34
- { :authenticity_token => form_authenticity_token, :add_rpx => add_rpx }.collect { |n| "#{n[0]}=#{ u(n[1]) }" if n[1] }
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
@@ -41,7 +41,7 @@ module AuthlogicRpx
41
41
 
42
42
  MAJOR = 1
43
43
  MINOR = 1
44
- TINY = 0
44
+ TINY = 1
45
45
 
46
46
  # The current version as a Version instance
47
47
  CURRENT = new(MAJOR, MINOR, TINY)
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.0
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-05 00:00:00 +08:00
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.11
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