omniauth-oauth_oidc 0.0.1

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.
@@ -0,0 +1,51 @@
1
+ class StrategyTestCase < MiniTest::Test
2
+ class DummyApp
3
+ def call(env); end
4
+ end
5
+
6
+ attr_accessor :identifier, :secret
7
+
8
+ def setup
9
+ @identifier = '1234'
10
+ @secret = '1234asdgat3'
11
+ end
12
+
13
+ def client
14
+ strategy.client
15
+ end
16
+
17
+ def user_info
18
+ @user_info ||= OpenIDConnect::ResponseObject::UserInfo.new(
19
+ sub: SecureRandom.hex(16),
20
+ name: Faker::Name.name,
21
+ email: Faker::Internet.email,
22
+ nickname: Faker::Name.first_name,
23
+ preferred_username: Faker::Internet.user_name,
24
+ given_name: Faker::Name.first_name,
25
+ family_name: Faker::Name.last_name,
26
+ gender: 'female',
27
+ picture: Faker::Internet.url + '.png',
28
+ phone_number: Faker::PhoneNumber.phone_number,
29
+ website: Faker::Internet.url,
30
+ )
31
+ end
32
+
33
+ def request
34
+ @request ||= stub('Request').tap do |request|
35
+ request.stubs(:params).returns({})
36
+ request.stubs(:cookies).returns({})
37
+ request.stubs(:env).returns({})
38
+ request.stubs(:scheme).returns({})
39
+ request.stubs(:ssl?).returns(false)
40
+ end
41
+ end
42
+
43
+ def strategy
44
+ @strategy ||= OmniAuth::Strategies::OpenIDConnect.new(DummyApp.new).tap do |strategy|
45
+ strategy.options.client_options.identifier = @identifier
46
+ strategy.options.client_options.secret = @secret
47
+ strategy.stubs(:request).returns(request)
48
+ strategy.stubs(:user_info).returns(user_info)
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,16 @@
1
+ lib = File.expand_path('../../lib', __FILE__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+
4
+ require 'simplecov'
5
+ require 'coveralls'
6
+ require 'minitest/autorun'
7
+ require 'mocha/minitest'
8
+ require 'faker'
9
+ require 'active_support'
10
+ require 'omniauth_openid_connect'
11
+ require_relative 'strategy_test_case'
12
+
13
+ SimpleCov.command_name 'test'
14
+ SimpleCov.start
15
+ Coveralls.wear!
16
+ OmniAuth.config.test_mode = true
metadata ADDED
@@ -0,0 +1,260 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: omniauth-oauth_oidc
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - John Bohn
8
+ - Ilya Shcherbinin
9
+ - Dan Jay
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2021-11-03 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: addressable
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - "~>"
20
+ - !ruby/object:Gem::Version
21
+ version: '2.5'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - "~>"
27
+ - !ruby/object:Gem::Version
28
+ version: '2.5'
29
+ - !ruby/object:Gem::Dependency
30
+ name: omniauth
31
+ requirement: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - "~>"
34
+ - !ruby/object:Gem::Version
35
+ version: '1.9'
36
+ type: :runtime
37
+ prerelease: false
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: '1.9'
43
+ - !ruby/object:Gem::Dependency
44
+ name: openid_connect
45
+ requirement: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '1.1'
50
+ type: :runtime
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - "~>"
55
+ - !ruby/object:Gem::Version
56
+ version: '1.1'
57
+ - !ruby/object:Gem::Dependency
58
+ name: coveralls
59
+ requirement: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - "~>"
62
+ - !ruby/object:Gem::Version
63
+ version: '0.8'
64
+ type: :development
65
+ prerelease: false
66
+ version_requirements: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - "~>"
69
+ - !ruby/object:Gem::Version
70
+ version: '0.8'
71
+ - !ruby/object:Gem::Dependency
72
+ name: faker
73
+ requirement: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - "~>"
76
+ - !ruby/object:Gem::Version
77
+ version: '1.6'
78
+ type: :development
79
+ prerelease: false
80
+ version_requirements: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - "~>"
83
+ - !ruby/object:Gem::Version
84
+ version: '1.6'
85
+ - !ruby/object:Gem::Dependency
86
+ name: guard
87
+ requirement: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - "~>"
90
+ - !ruby/object:Gem::Version
91
+ version: '2.14'
92
+ type: :development
93
+ prerelease: false
94
+ version_requirements: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - "~>"
97
+ - !ruby/object:Gem::Version
98
+ version: '2.14'
99
+ - !ruby/object:Gem::Dependency
100
+ name: guard-bundler
101
+ requirement: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - "~>"
104
+ - !ruby/object:Gem::Version
105
+ version: '2.2'
106
+ type: :development
107
+ prerelease: false
108
+ version_requirements: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - "~>"
111
+ - !ruby/object:Gem::Version
112
+ version: '2.2'
113
+ - !ruby/object:Gem::Dependency
114
+ name: guard-minitest
115
+ requirement: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - "~>"
118
+ - !ruby/object:Gem::Version
119
+ version: '2.4'
120
+ type: :development
121
+ prerelease: false
122
+ version_requirements: !ruby/object:Gem::Requirement
123
+ requirements:
124
+ - - "~>"
125
+ - !ruby/object:Gem::Version
126
+ version: '2.4'
127
+ - !ruby/object:Gem::Dependency
128
+ name: minitest
129
+ requirement: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - "~>"
132
+ - !ruby/object:Gem::Version
133
+ version: '5.1'
134
+ type: :development
135
+ prerelease: false
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ requirements:
138
+ - - "~>"
139
+ - !ruby/object:Gem::Version
140
+ version: '5.1'
141
+ - !ruby/object:Gem::Dependency
142
+ name: mocha
143
+ requirement: !ruby/object:Gem::Requirement
144
+ requirements:
145
+ - - "~>"
146
+ - !ruby/object:Gem::Version
147
+ version: '1.7'
148
+ type: :development
149
+ prerelease: false
150
+ version_requirements: !ruby/object:Gem::Requirement
151
+ requirements:
152
+ - - "~>"
153
+ - !ruby/object:Gem::Version
154
+ version: '1.7'
155
+ - !ruby/object:Gem::Dependency
156
+ name: rake
157
+ requirement: !ruby/object:Gem::Requirement
158
+ requirements:
159
+ - - "~>"
160
+ - !ruby/object:Gem::Version
161
+ version: '12.0'
162
+ type: :development
163
+ prerelease: false
164
+ version_requirements: !ruby/object:Gem::Requirement
165
+ requirements:
166
+ - - "~>"
167
+ - !ruby/object:Gem::Version
168
+ version: '12.0'
169
+ - !ruby/object:Gem::Dependency
170
+ name: rubocop
171
+ requirement: !ruby/object:Gem::Requirement
172
+ requirements:
173
+ - - "~>"
174
+ - !ruby/object:Gem::Version
175
+ version: '0.63'
176
+ type: :development
177
+ prerelease: false
178
+ version_requirements: !ruby/object:Gem::Requirement
179
+ requirements:
180
+ - - "~>"
181
+ - !ruby/object:Gem::Version
182
+ version: '0.63'
183
+ - !ruby/object:Gem::Dependency
184
+ name: simplecov
185
+ requirement: !ruby/object:Gem::Requirement
186
+ requirements:
187
+ - - "~>"
188
+ - !ruby/object:Gem::Version
189
+ version: '0.12'
190
+ type: :development
191
+ prerelease: false
192
+ version_requirements: !ruby/object:Gem::Requirement
193
+ requirements:
194
+ - - "~>"
195
+ - !ruby/object:Gem::Version
196
+ version: '0.12'
197
+ description: OpenID Connect Strategy for OmniAuth.
198
+ email:
199
+ - jjbohn@gmail.com
200
+ - m0n9oose@gmail.com
201
+ - dan@danjay.co.uk
202
+ executables: []
203
+ extensions: []
204
+ extra_rdoc_files: []
205
+ files:
206
+ - ".github/config/rubocop_linter_action.yml"
207
+ - ".github/stale.yml"
208
+ - ".github/workflows/rubocop.yml"
209
+ - ".gitignore"
210
+ - ".rubocop.yml"
211
+ - ".travis.yml"
212
+ - CHANGELOG.md
213
+ - Gemfile
214
+ - Guardfile
215
+ - LICENSE.txt
216
+ - README.md
217
+ - Rakefile
218
+ - lib/omniauth/openid_connect.rb
219
+ - lib/omniauth/openid_connect/errors.rb
220
+ - lib/omniauth/openid_connect/version.rb
221
+ - lib/omniauth/strategies/openid_connect.rb
222
+ - lib/omniauth_openid_connect.rb
223
+ - omniauth-oauth_oidc.gemspec
224
+ - omniauth_openid_connect.gemspec
225
+ - test/fixtures/id_token.txt
226
+ - test/fixtures/jwks.json
227
+ - test/fixtures/test.crt
228
+ - test/lib/omniauth/strategies/openid_connect_test.rb
229
+ - test/strategy_test_case.rb
230
+ - test/test_helper.rb
231
+ homepage: https://github.com/danjay/omniauth_openid_connect
232
+ licenses:
233
+ - MIT
234
+ metadata: {}
235
+ post_install_message:
236
+ rdoc_options: []
237
+ require_paths:
238
+ - lib
239
+ required_ruby_version: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - ">="
242
+ - !ruby/object:Gem::Version
243
+ version: '0'
244
+ required_rubygems_version: !ruby/object:Gem::Requirement
245
+ requirements:
246
+ - - ">="
247
+ - !ruby/object:Gem::Version
248
+ version: '0'
249
+ requirements: []
250
+ rubygems_version: 3.0.6
251
+ signing_key:
252
+ specification_version: 4
253
+ summary: OpenID Connect Strategy for OmniAuth
254
+ test_files:
255
+ - test/fixtures/id_token.txt
256
+ - test/fixtures/jwks.json
257
+ - test/fixtures/test.crt
258
+ - test/lib/omniauth/strategies/openid_connect_test.rb
259
+ - test/strategy_test_case.rb
260
+ - test/test_helper.rb