sinatra_auth_github 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +1 -1
- data/lib/sinatra/auth/github.rb +12 -0
- data/lib/sinatra/auth/github/version.rb +1 -1
- data/sinatra_auth_github.gemspec +2 -1
- data/spec/app.rb +3 -0
- metadata +26 -41
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 74cd4b9c57ecff85ab2beefaddd9920f74f3c1bc
|
4
|
+
data.tar.gz: 3503bf89421b9faa6c927892e7b0de04eb165e4f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 920a0d70fb53ca8987981591d700a0a4acaf6de642af80d585a66fe275ab02d1eff9b96c58bb46ba8aec4e58ea8d7d061e66a94acf18136987769ef48897f275
|
7
|
+
data.tar.gz: 4dcb51b0972b5138042f636ce40138e928dacdbb1ee012eb757695e4002bd5b68c8c12e2831b5de826fb8769e152be4486e1c6fcf4506b4a5839e725ff87c9e5
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
sinatra_auth_github
|
2
2
|
===================
|
3
3
|
|
4
|
-
A sinatra extension that provides oauth authentication to github. Find out more about enabling your application at github's [oauth quickstart](http://
|
4
|
+
A sinatra extension that provides oauth authentication to github. Find out more about enabling your application at github's [oauth quickstart](http://developer.github.com/v3/oauth/).
|
5
5
|
|
6
6
|
To test it out on localhost set your callback url to 'http://localhost:9393/auth/github/callback'
|
7
7
|
|
data/lib/sinatra/auth/github.rb
CHANGED
@@ -159,6 +159,18 @@ module Sinatra
|
|
159
159
|
:scope => app.github_options[:scopes] || '',
|
160
160
|
:redirect_uri => app.github_options[:callback_url] || '/auth/github/callback'
|
161
161
|
}
|
162
|
+
|
163
|
+
manager.serialize_from_session { |key| Warden::GitHub::Verifier.load(key) }
|
164
|
+
manager.serialize_into_session { |user| Warden::GitHub::Verifier.dump(user) }
|
165
|
+
end
|
166
|
+
|
167
|
+
|
168
|
+
# Sign cookie sessions in with AS::Verifier
|
169
|
+
ENV['WARDEN_GITHUB_VERIFIER_SECRET'] ||= ENV['GITHUB_VERIFIER_SECRET']
|
170
|
+
|
171
|
+
unless ENV['WARDEN_GITHUB_VERIFIER_SECRET']
|
172
|
+
warn "No WARDEN_GITHUB_VERIFIER_SECRET environmental variable found."
|
173
|
+
warn "Your sessions are likely being stored insecurely."
|
162
174
|
end
|
163
175
|
|
164
176
|
app.helpers Helpers
|
data/sinatra_auth_github.gemspec
CHANGED
@@ -10,12 +10,13 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.email = ["atmos@atmos.org"]
|
11
11
|
s.homepage = "http://github.com/atmos/sinatra_auth_github"
|
12
12
|
s.summary = "A sinatra extension for easy oauth integration with github"
|
13
|
+
s.license = "MIT"
|
13
14
|
s.description = s.summary
|
14
15
|
|
15
16
|
s.rubyforge_project = "sinatra_auth_github"
|
16
17
|
|
17
18
|
s.add_dependency "sinatra", "~>1.0"
|
18
|
-
s.add_dependency "warden-github", "~>1.0"
|
19
|
+
s.add_dependency "warden-github", "~>1.1.0"
|
19
20
|
|
20
21
|
s.add_development_dependency "rake"
|
21
22
|
s.add_development_dependency "rspec", "~>2.4.0"
|
data/spec/app.rb
CHANGED
metadata
CHANGED
@@ -1,126 +1,111 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra_auth_github
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
5
|
-
prerelease:
|
4
|
+
version: 1.1.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Corey Donohoe
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2015-01-13 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: '1.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: '1.0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: warden-github
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- - ~>
|
31
|
+
- - "~>"
|
36
32
|
- !ruby/object:Gem::Version
|
37
|
-
version:
|
33
|
+
version: 1.1.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
|
-
version:
|
40
|
+
version: 1.1.0
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: rake
|
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: :development
|
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: rspec
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- - ~>
|
59
|
+
- - "~>"
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: 2.4.0
|
70
62
|
type: :development
|
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: 2.4.0
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: shotgun
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
|
-
- -
|
73
|
+
- - ">="
|
84
74
|
- !ruby/object:Gem::Version
|
85
75
|
version: '0'
|
86
76
|
type: :development
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
|
-
- -
|
80
|
+
- - ">="
|
92
81
|
- !ruby/object:Gem::Version
|
93
82
|
version: '0'
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
84
|
name: randexp
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
86
|
requirements:
|
99
|
-
- - ~>
|
87
|
+
- - "~>"
|
100
88
|
- !ruby/object:Gem::Version
|
101
89
|
version: 0.1.5
|
102
90
|
type: :development
|
103
91
|
prerelease: false
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
93
|
requirements:
|
107
|
-
- - ~>
|
94
|
+
- - "~>"
|
108
95
|
- !ruby/object:Gem::Version
|
109
96
|
version: 0.1.5
|
110
97
|
- !ruby/object:Gem::Dependency
|
111
98
|
name: rack-test
|
112
99
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
100
|
requirements:
|
115
|
-
- - ~>
|
101
|
+
- - "~>"
|
116
102
|
- !ruby/object:Gem::Version
|
117
103
|
version: 0.5.3
|
118
104
|
type: :development
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
107
|
requirements:
|
123
|
-
- - ~>
|
108
|
+
- - "~>"
|
124
109
|
- !ruby/object:Gem::Version
|
125
110
|
version: 0.5.3
|
126
111
|
description: A sinatra extension for easy oauth integration with github
|
@@ -130,7 +115,7 @@ executables: []
|
|
130
115
|
extensions: []
|
131
116
|
extra_rdoc_files: []
|
132
117
|
files:
|
133
|
-
- .gitignore
|
118
|
+
- ".gitignore"
|
134
119
|
- CHANGELOG.md
|
135
120
|
- Gemfile
|
136
121
|
- LICENSE
|
@@ -149,28 +134,28 @@ files:
|
|
149
134
|
- spec/quality_spec.rb
|
150
135
|
- spec/spec_helper.rb
|
151
136
|
homepage: http://github.com/atmos/sinatra_auth_github
|
152
|
-
licenses:
|
137
|
+
licenses:
|
138
|
+
- MIT
|
139
|
+
metadata: {}
|
153
140
|
post_install_message:
|
154
141
|
rdoc_options: []
|
155
142
|
require_paths:
|
156
143
|
- lib
|
157
144
|
required_ruby_version: !ruby/object:Gem::Requirement
|
158
|
-
none: false
|
159
145
|
requirements:
|
160
|
-
- -
|
146
|
+
- - ">="
|
161
147
|
- !ruby/object:Gem::Version
|
162
148
|
version: '0'
|
163
149
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
164
|
-
none: false
|
165
150
|
requirements:
|
166
|
-
- -
|
151
|
+
- - ">="
|
167
152
|
- !ruby/object:Gem::Version
|
168
153
|
version: '0'
|
169
154
|
requirements: []
|
170
155
|
rubyforge_project: sinatra_auth_github
|
171
|
-
rubygems_version:
|
156
|
+
rubygems_version: 2.2.2
|
172
157
|
signing_key:
|
173
|
-
specification_version:
|
158
|
+
specification_version: 4
|
174
159
|
summary: A sinatra extension for easy oauth integration with github
|
175
160
|
test_files:
|
176
161
|
- spec/app.rb
|