authlogic_wind 0.1.1 → 0.1.2

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{authlogic_wind}
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["James Stuart"]
@@ -1,16 +1,10 @@
1
1
  module AuthlogicWind
2
2
  module Helper
3
- def oauth_register_button(options = {})
4
- oauth_button('register_with_oauth', options)
5
- end
6
-
7
- def oauth_login_button(options = {})
8
- oauth_button('login_with_oauth', options)
9
- end
10
-
11
- private
12
- def oauth_button(name, options = {})
13
- "<input type='submit' value='#{options[:value]}' name='#{name}' id='user_submit' class='#{options[:class]}'/>"
3
+ def wind_login_link(session_class, controller_name, options = {})
4
+ callback = url_for(:only_path => false, :controller => controller_name) + "/create"
5
+ link_to (options[:name] || "Login"), url_for(:host => session_class.wind_host, :controller => "login", :protocol => "https", :service => session_class.wind_service, :destination => callback)
6
+
7
+
14
8
  end
15
9
  end
16
10
  end
@@ -63,6 +63,11 @@ module AuthlogicWind
63
63
  end
64
64
 
65
65
 
66
+ def build_callback_url
67
+ wind_controller.url_for :controller => wind_controller.controller_name, :action => wind_controller.action_name
68
+ end
69
+
70
+
66
71
  private
67
72
  def authenticating_with_wind?
68
73
  # Initial request when user presses one of the button helpers
@@ -144,9 +149,6 @@ module AuthlogicWind
144
149
  wind_controller.redirect_to wind_controller.url_for(:host => wind_host, :controller => "login", :protocol => "https", :service => wind_service, :destination => build_callback_url)
145
150
  end
146
151
 
147
- def build_callback_url
148
- wind_controller.url_for :controller => wind_controller.controller_name, :action => wind_controller.action_name
149
- end
150
152
 
151
153
  def generate_verified_login
152
154
  if (ticketid = wind_controller.params[:ticketid])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authlogic_wind
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Stuart