reviewed-auth 0.2.5 → 0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/reviewed-auth/login_controller.rb +13 -1
- data/lib/reviewed-auth/version.rb +1 -1
- metadata +16 -26
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 380386fa0dabad8da175fb61be125b570971fdbe
|
4
|
+
data.tar.gz: 6f32aa6563b81d581232efd28fbfabb63cd059d2
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c398302d36ad138651c6c888d8a93b38654202cf33be9b31adc387e5e0550ecc6ddf54bf77c880813ae05d8d9ddf4c0d80dbdc5188309deb0960924af10d99fd
|
7
|
+
data.tar.gz: a7d61d1328f62bb4a4c3756d1723293a6fa0e885b1cd4d2dc293b8d8db01d31664a99c0ac34e6cc2b8be96cfb0cec710e956d49662a28954986f6fff7e27b8de
|
@@ -11,6 +11,9 @@ module Reviewed
|
|
11
11
|
set :views, File.expand_path(File.join(File.dirname(__FILE__), "views"))
|
12
12
|
# use Rack::Session::Cookie, secret: '0Shitt4dL3yTYe0VXfCDmQ', key: "reviewed.auth.session"
|
13
13
|
|
14
|
+
DAY = 60 * 60 * 24
|
15
|
+
YEAR = DAY * 365
|
16
|
+
|
14
17
|
get "/assets/*" do
|
15
18
|
file = params[:splat].join("/")
|
16
19
|
ext = File.extname(file)
|
@@ -35,7 +38,16 @@ module Reviewed
|
|
35
38
|
if resp.status == 200
|
36
39
|
@user = OpenStruct.new(JSON.parse(resp.body))
|
37
40
|
if params[:drop_cookie] == "true"
|
38
|
-
response.set_cookie(:_reviewed_token,
|
41
|
+
response.set_cookie(:_reviewed_token,
|
42
|
+
value: @user.token,
|
43
|
+
path: "/",
|
44
|
+
expires: Time.now + (DAY * 7)
|
45
|
+
)
|
46
|
+
response.set_cookie("_reviewed_analytics",
|
47
|
+
:value => 1,
|
48
|
+
:domain => ".reviewed.com",
|
49
|
+
:expires => Time.now + (YEAR * 10)
|
50
|
+
)
|
39
51
|
end
|
40
52
|
if params[:return_url] != ""
|
41
53
|
url = CGI.unescape(params[:return_url])
|
metadata
CHANGED
@@ -1,78 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reviewed-auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: '0.3'
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Mark Bates
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2014-
|
11
|
+
date: 2014-09-15 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: sinatra
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: sinatra-contrib
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - ">="
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - ">="
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: faraday
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - ">="
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - ">="
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: sinatra-twitter-bootstrap
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - ">="
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: '0'
|
70
62
|
type: :runtime
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- -
|
66
|
+
- - ">="
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: '0'
|
78
69
|
description: Central Authentication Service for Reviewed.com
|
@@ -82,7 +73,7 @@ executables: []
|
|
82
73
|
extensions: []
|
83
74
|
extra_rdoc_files: []
|
84
75
|
files:
|
85
|
-
- .gitignore
|
76
|
+
- ".gitignore"
|
86
77
|
- Gemfile
|
87
78
|
- Gemfile.lock
|
88
79
|
- LICENSE.txt
|
@@ -97,26 +88,25 @@ files:
|
|
97
88
|
- reviewed-auth.gemspec
|
98
89
|
homepage: ''
|
99
90
|
licenses: []
|
91
|
+
metadata: {}
|
100
92
|
post_install_message:
|
101
93
|
rdoc_options: []
|
102
94
|
require_paths:
|
103
95
|
- lib
|
104
96
|
required_ruby_version: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
97
|
requirements:
|
107
|
-
- -
|
98
|
+
- - ">="
|
108
99
|
- !ruby/object:Gem::Version
|
109
100
|
version: '0'
|
110
101
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
111
|
-
none: false
|
112
102
|
requirements:
|
113
|
-
- -
|
103
|
+
- - ">="
|
114
104
|
- !ruby/object:Gem::Version
|
115
105
|
version: '0'
|
116
106
|
requirements: []
|
117
107
|
rubyforge_project:
|
118
|
-
rubygems_version:
|
108
|
+
rubygems_version: 2.2.2
|
119
109
|
signing_key:
|
120
|
-
specification_version:
|
110
|
+
specification_version: 4
|
121
111
|
summary: Central Authentication Service for Reviewed.com
|
122
112
|
test_files: []
|