exvo-auth 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README +19 -3
- data/VERSION +1 -1
- data/exvo-auth.gemspec +2 -2
- data/lib/exvo_auth/strategies/interactive.rb +3 -2
- metadata +3 -3
data/README
CHANGED
@@ -38,13 +38,29 @@ like shown above.
|
|
38
38
|
|
39
39
|
include ExvoAuth::Controllers::Rails (or Merb)
|
40
40
|
|
41
|
-
5. Implement
|
41
|
+
5. Implement a sessions controller.
|
42
42
|
|
43
|
-
Sample implementation
|
43
|
+
Sample implementation (Rails):
|
44
44
|
|
45
|
+
class SessionsController < ApplicationController
|
45
46
|
def create
|
46
|
-
|
47
|
+
auth = params[:auth]
|
48
|
+
user = User.find_or_create_by_uid(auth["uid"])
|
49
|
+
|
50
|
+
user_info = auth["user_info"]
|
51
|
+
user.update_attributes!(user_info)
|
52
|
+
|
53
|
+
sign_in_and_redirect!(user.id)
|
54
|
+
end
|
55
|
+
|
56
|
+
def destroy
|
57
|
+
sign_out_and_redirect!
|
58
|
+
end
|
59
|
+
|
60
|
+
def failure
|
61
|
+
render :text => "Sorry!"
|
47
62
|
end
|
63
|
+
end
|
48
64
|
|
49
65
|
In short: you get params[:auth]. Do what you want to do with it: store the data, create session, etc.
|
50
66
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.2
|
data/exvo-auth.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{exvo-auth}
|
8
|
-
s.version = "0.5.
|
8
|
+
s.version = "0.5.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jacek Becela"]
|
12
|
-
s.date = %q{2010-07-
|
12
|
+
s.date = %q{2010-07-15}
|
13
13
|
s.description = %q{Sign in with Exvo account}
|
14
14
|
s.email = %q{jacek.becela@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -5,8 +5,9 @@ class ExvoAuth::Strategies::Interactive < ExvoAuth::Strategies::Base
|
|
5
5
|
|
6
6
|
def request_phase(options = {})
|
7
7
|
super(unicorns_and_rainbows(
|
8
|
-
:scope
|
9
|
-
:state
|
8
|
+
:scope => request["scope"],
|
9
|
+
:state => request["state"],
|
10
|
+
:x_sign_up => request["x_sign_up"]
|
10
11
|
))
|
11
12
|
end
|
12
13
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 5
|
8
|
-
-
|
9
|
-
version: 0.5.
|
8
|
+
- 2
|
9
|
+
version: 0.5.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Jacek Becela
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-07-
|
17
|
+
date: 2010-07-15 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|