exvo-auth 0.7.5 → 0.7.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README +9 -1
- data/VERSION +1 -1
- data/exvo-auth.gemspec +2 -2
- data/lib/exvo_auth/controllers/base.rb +9 -1
- data/lib/exvo_auth/controllers/rails.rb +1 -1
- metadata +3 -3
data/README
CHANGED
@@ -77,7 +77,15 @@ end
|
|
77
77
|
In short: you get params[:auth]. Do what you want to do with it: store the data, create session, etc.
|
78
78
|
|
79
79
|
|
80
|
-
6.
|
80
|
+
6. Sign up and sign in paths for use in links.
|
81
|
+
|
82
|
+
sign in path: "/auth/interactive"
|
83
|
+
sign up path: "/auth/interactive?x_sign_up=true" # this is OAuth2 custom param
|
84
|
+
|
85
|
+
You have a handy methods available in controllers (and views in Rails): sign_in_path and sign_up_path.
|
86
|
+
|
87
|
+
|
88
|
+
7. Read the source, there are few features not mentioned in this README.
|
81
89
|
|
82
90
|
|
83
91
|
Inter-Application Communication
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.
|
1
|
+
0.7.6
|
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.7.
|
8
|
+
s.version = "0.7.6"
|
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-23}
|
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 = [
|
@@ -14,7 +14,7 @@ module ExvoAuth::Controllers::Base
|
|
14
14
|
if callback_value
|
15
15
|
redirect_to non_interactive_sign_in_path(callback_key => callback_value)
|
16
16
|
else
|
17
|
-
redirect_to
|
17
|
+
redirect_to sign_in_path
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
@@ -42,6 +42,14 @@ module ExvoAuth::Controllers::Base
|
|
42
42
|
redirect_to sign_out_url(return_to)
|
43
43
|
end
|
44
44
|
|
45
|
+
def sign_in_path
|
46
|
+
"/auth/interactive"
|
47
|
+
end
|
48
|
+
|
49
|
+
def sign_up_path
|
50
|
+
"/auth/interactive?x_sign_up=true"
|
51
|
+
end
|
52
|
+
|
45
53
|
def current_user
|
46
54
|
return @current_user if defined?(@current_user)
|
47
55
|
@current_user = session[:user_id] && find_user_by_id(session[:user_id])
|
@@ -2,7 +2,7 @@ module ExvoAuth::Controllers::Rails
|
|
2
2
|
def self.included(base)
|
3
3
|
base.send :include, ExvoAuth::Controllers::Base
|
4
4
|
base.send :include, InstanceMethods
|
5
|
-
base.helper_method :current_user, :signed_in
|
5
|
+
base.helper_method :current_user, :signed_in?, :sign_up_path, :sign_in_path
|
6
6
|
end
|
7
7
|
|
8
8
|
module InstanceMethods
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 7
|
8
|
-
-
|
9
|
-
version: 0.7.
|
8
|
+
- 6
|
9
|
+
version: 0.7.6
|
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-23 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|