exvo-auth 0.7.8 → 0.7.9
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 +1 -1
- data/VERSION +1 -1
- data/exvo-auth.gemspec +2 -2
- data/lib/exvo_auth/controllers/merb.rb +16 -2
- metadata +3 -3
data/README
CHANGED
@@ -57,7 +57,7 @@ Sample implementation (Rails):
|
|
57
57
|
|
58
58
|
class SessionsController < ApplicationController
|
59
59
|
def create
|
60
|
-
auth = params[:auth]
|
60
|
+
auth = params[:auth] # sometimes you will need to do this: request.env["rack.request.query_hash"]["auth"]
|
61
61
|
user = User.find_or_create_by_uid(auth["uid"])
|
62
62
|
|
63
63
|
user_info = auth["user_info"]
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.
|
1
|
+
0.7.9
|
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.9"
|
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-
|
12
|
+
s.date = %q{2010-08-09}
|
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 = [
|
@@ -18,12 +18,26 @@ module ExvoAuth::Controllers::Merb
|
|
18
18
|
).scopes
|
19
19
|
|
20
20
|
@current_consumer_id = consumer_id
|
21
|
-
|
22
|
-
|
21
|
+
|
22
|
+
if !request.ssl?
|
23
|
+
error("Auth: SSL not configured")
|
24
|
+
return false
|
25
|
+
end
|
26
|
+
|
27
|
+
if !current_scopes.include?(scope)
|
28
|
+
error("Auth: Requested scope (#{scope}) not in a list: #{current_scopes.join(', ')}")
|
29
|
+
return false
|
30
|
+
end
|
31
|
+
|
32
|
+
true
|
23
33
|
end
|
24
34
|
end
|
25
35
|
|
26
36
|
protected
|
37
|
+
|
38
|
+
def error(message)
|
39
|
+
Merb.logger.error(message) if defined?(Merb.logger)
|
40
|
+
end
|
27
41
|
|
28
42
|
def redirect_to(*args)
|
29
43
|
redirect(*args)
|
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
|
+
- 9
|
9
|
+
version: 0.7.9
|
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-
|
17
|
+
date: 2010-08-09 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|