exvo-auth 0.5.1 → 0.5.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/README CHANGED
@@ -38,13 +38,29 @@ like shown above.
38
38
 
39
39
  include ExvoAuth::Controllers::Rails (or Merb)
40
40
 
41
- 5. Implement callback(s).
41
+ 5. Implement a sessions controller.
42
42
 
43
- Sample implementation in SessionsController:
43
+ Sample implementation (Rails):
44
44
 
45
+ class SessionsController < ApplicationController
45
46
  def create
46
- render :text => params[:auth].inspect
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
1
+ 0.5.2
@@ -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.1"
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-13}
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 => request["scope"],
9
- :state => request["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
- - 1
9
- version: 0.5.1
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-13 00:00:00 +02:00
17
+ date: 2010-07-15 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency