authlogic-oauth 1.0.4 → 1.0.5
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/Manifest.txt +1 -0
- data/README.rdoc +4 -4
- data/lib/authlogic_oauth/version.rb +1 -1
- data/lib/oauth_callback_filter.rb +12 -0
- metadata +4 -5
data/Manifest.txt
CHANGED
data/README.rdoc
CHANGED
@@ -6,14 +6,14 @@ Authlogic OAuth is an extension of the Authlogic library to add OAuth support. O
|
|
6
6
|
|
7
7
|
* <b>Authlogic:</b> http://github.com/binarylogic/authlogic
|
8
8
|
* <b>OAuth Example Project:</b> http://github.com/jrallison/authlogic_example/tree/with-oauth
|
9
|
-
* <b>Live example with Twitter:</b> http://authlogic-oauth.heroku.com
|
9
|
+
* <b>Live example with Twitter:</b> http://authlogic-oauth.heroku.com
|
10
10
|
|
11
11
|
== Install and use
|
12
12
|
|
13
13
|
=== 1. Install Authlogic and setup your application
|
14
14
|
|
15
|
-
|
16
|
-
|
15
|
+
* <b>Authlogic:</b> http://github.com/binarylogic/authlogic
|
16
|
+
* <b>Authlogic Example:</b> http://github.com/binarylogic/authlogic_example
|
17
17
|
|
18
18
|
=== 2. Install OAuth and Authlogic_Oauth
|
19
19
|
|
@@ -89,7 +89,7 @@ The oauth_consumer should return an OAuth::Consumer which is configured for your
|
|
89
89
|
=== 6. Add login and register buttons to your views
|
90
90
|
|
91
91
|
<%= oauth_register_button :value => "Register with Twitter" %>
|
92
|
-
<%=
|
92
|
+
<%= oauth_login_button :value => "Login with Twitter" %>
|
93
93
|
|
94
94
|
That's it! The rest is taken care of for you.
|
95
95
|
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class OauthCallbackFilter
|
2
|
+
def initialize(app)
|
3
|
+
@app = app
|
4
|
+
end
|
5
|
+
|
6
|
+
def call(env)
|
7
|
+
unless env["rack.session"][:oauth_callback_method].blank?
|
8
|
+
env["REQUEST_METHOD"] = env["rack.session"].delete(:oauth_callback_method).to_s.upcase
|
9
|
+
end
|
10
|
+
@app.call(env)
|
11
|
+
end
|
12
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authlogic-oauth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Allison
|
@@ -55,6 +55,7 @@ files:
|
|
55
55
|
- lib/authlogic_oauth/oauth_process.rb
|
56
56
|
- lib/authlogic_oauth/session.rb
|
57
57
|
- lib/authlogic_oauth/version.rb
|
58
|
+
- lib/oauth_callback_filter.rb
|
58
59
|
- rails/init.rb
|
59
60
|
- test/acts_as_authentic_test.rb
|
60
61
|
- test/fixtures/users.yml
|
@@ -64,8 +65,6 @@ files:
|
|
64
65
|
- test/test_helper.rb
|
65
66
|
has_rdoc: true
|
66
67
|
homepage: http://github.com/jrallison/authlogic_oauth
|
67
|
-
licenses: []
|
68
|
-
|
69
68
|
post_install_message:
|
70
69
|
rdoc_options:
|
71
70
|
- --main
|
@@ -87,9 +86,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
87
86
|
requirements: []
|
88
87
|
|
89
88
|
rubyforge_project: authlogic-oauth
|
90
|
-
rubygems_version: 1.3.
|
89
|
+
rubygems_version: 1.3.1
|
91
90
|
signing_key:
|
92
|
-
specification_version:
|
91
|
+
specification_version: 2
|
93
92
|
summary: An authlogic extension for authenticating via OAuth. (I.E. Twitter login)
|
94
93
|
test_files:
|
95
94
|
- test/acts_as_authentic_test.rb
|