web47sso 0.1.0

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/Gemfile.lock ADDED
@@ -0,0 +1,440 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ web47sso (0.1.0)
5
+ mongoid (~> 9.0)
6
+ web47core (~> 3.2.28)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actioncable (7.2.2.1)
12
+ actionpack (= 7.2.2.1)
13
+ activesupport (= 7.2.2.1)
14
+ nio4r (~> 2.0)
15
+ websocket-driver (>= 0.6.1)
16
+ zeitwerk (~> 2.6)
17
+ actionmailbox (7.2.2.1)
18
+ actionpack (= 7.2.2.1)
19
+ activejob (= 7.2.2.1)
20
+ activerecord (= 7.2.2.1)
21
+ activestorage (= 7.2.2.1)
22
+ activesupport (= 7.2.2.1)
23
+ mail (>= 2.8.0)
24
+ actionmailer (7.2.2.1)
25
+ actionpack (= 7.2.2.1)
26
+ actionview (= 7.2.2.1)
27
+ activejob (= 7.2.2.1)
28
+ activesupport (= 7.2.2.1)
29
+ mail (>= 2.8.0)
30
+ rails-dom-testing (~> 2.2)
31
+ actionpack (7.2.2.1)
32
+ actionview (= 7.2.2.1)
33
+ activesupport (= 7.2.2.1)
34
+ nokogiri (>= 1.8.5)
35
+ racc
36
+ rack (>= 2.2.4, < 3.2)
37
+ rack-session (>= 1.0.1)
38
+ rack-test (>= 0.6.3)
39
+ rails-dom-testing (~> 2.2)
40
+ rails-html-sanitizer (~> 1.6)
41
+ useragent (~> 0.16)
42
+ actiontext (7.2.2.1)
43
+ actionpack (= 7.2.2.1)
44
+ activerecord (= 7.2.2.1)
45
+ activestorage (= 7.2.2.1)
46
+ activesupport (= 7.2.2.1)
47
+ globalid (>= 0.6.0)
48
+ nokogiri (>= 1.8.5)
49
+ actionview (7.2.2.1)
50
+ activesupport (= 7.2.2.1)
51
+ builder (~> 3.1)
52
+ erubi (~> 1.11)
53
+ rails-dom-testing (~> 2.2)
54
+ rails-html-sanitizer (~> 1.6)
55
+ activejob (7.2.2.1)
56
+ activesupport (= 7.2.2.1)
57
+ globalid (>= 0.3.6)
58
+ activemodel (7.2.2.1)
59
+ activesupport (= 7.2.2.1)
60
+ activerecord (7.2.2.1)
61
+ activemodel (= 7.2.2.1)
62
+ activesupport (= 7.2.2.1)
63
+ timeout (>= 0.4.0)
64
+ activestorage (7.2.2.1)
65
+ actionpack (= 7.2.2.1)
66
+ activejob (= 7.2.2.1)
67
+ activerecord (= 7.2.2.1)
68
+ activesupport (= 7.2.2.1)
69
+ marcel (~> 1.0)
70
+ activesupport (7.2.2.1)
71
+ base64
72
+ benchmark (>= 0.3)
73
+ bigdecimal
74
+ concurrent-ruby (~> 1.0, >= 1.3.1)
75
+ connection_pool (>= 2.2.5)
76
+ drb
77
+ i18n (>= 1.6, < 2)
78
+ logger (>= 1.4.2)
79
+ minitest (>= 5.1)
80
+ securerandom (>= 0.3)
81
+ tzinfo (~> 2.0, >= 2.0.5)
82
+ addressable (2.8.7)
83
+ public_suffix (>= 2.0.2, < 7.0)
84
+ ansi (1.5.0)
85
+ autoprefixer-rails (10.4.21.0)
86
+ execjs (~> 2)
87
+ aws-eventstream (1.4.0)
88
+ aws-partitions (1.1135.0)
89
+ aws-sdk-autoscaling (1.139.0)
90
+ aws-sdk-core (~> 3, >= 3.227.0)
91
+ aws-sigv4 (~> 1.5)
92
+ aws-sdk-core (3.227.0)
93
+ aws-eventstream (~> 1, >= 1.3.0)
94
+ aws-partitions (~> 1, >= 1.992.0)
95
+ aws-sigv4 (~> 1.9)
96
+ base64
97
+ jmespath (~> 1, >= 1.6.1)
98
+ logger
99
+ aws-sigv4 (1.12.1)
100
+ aws-eventstream (~> 1, >= 1.0.2)
101
+ base64 (0.3.0)
102
+ benchmark (0.4.1)
103
+ bigdecimal (3.2.2)
104
+ brakeman (7.1.0)
105
+ racc
106
+ bson (5.1.1)
107
+ builder (3.3.0)
108
+ cancancan (3.6.1)
109
+ codacy-coverage (2.2.1)
110
+ simplecov
111
+ concurrent-ruby (1.3.5)
112
+ connection_pool (2.5.3)
113
+ crack (1.0.0)
114
+ bigdecimal
115
+ rexml
116
+ crass (1.0.6)
117
+ daemons (1.4.1)
118
+ database_cleaner-core (2.0.1)
119
+ database_cleaner-mongoid (2.0.1)
120
+ database_cleaner-core (~> 2.0.0)
121
+ mongoid
122
+ date (3.4.1)
123
+ delayed_job (4.1.13)
124
+ activesupport (>= 3.0, < 9.0)
125
+ delayed_job_mongoid (3.0.0)
126
+ delayed_job (>= 3.0, < 5)
127
+ mongoid (>= 5.0)
128
+ docile (1.4.1)
129
+ domain_name (0.6.20240107)
130
+ drb (2.2.3)
131
+ erb (5.0.2)
132
+ erubi (1.13.1)
133
+ execjs (2.10.0)
134
+ factory_bot (6.5.4)
135
+ activesupport (>= 6.1.0)
136
+ factory_bot_rails (6.5.0)
137
+ factory_bot (~> 6.5)
138
+ railties (>= 6.1.0)
139
+ faraday (2.13.4)
140
+ faraday-net_http (>= 2.0, < 3.5)
141
+ json
142
+ logger
143
+ faraday-net_http (3.4.1)
144
+ net-http (>= 0.5.0)
145
+ ffi (1.17.2-aarch64-linux-gnu)
146
+ ffi (1.17.2-aarch64-linux-musl)
147
+ ffi (1.17.2-arm-linux-gnu)
148
+ ffi (1.17.2-arm-linux-musl)
149
+ ffi (1.17.2-arm64-darwin)
150
+ ffi (1.17.2-x86_64-darwin)
151
+ ffi (1.17.2-x86_64-linux-gnu)
152
+ ffi (1.17.2-x86_64-linux-musl)
153
+ globalid (1.2.1)
154
+ activesupport (>= 6.1)
155
+ haml (6.3.0)
156
+ temple (>= 0.8.2)
157
+ thor
158
+ tilt
159
+ hashdiff (1.2.0)
160
+ http-accept (1.7.0)
161
+ http-cookie (1.0.8)
162
+ domain_name (~> 0.5)
163
+ i18n (1.14.7)
164
+ concurrent-ruby (~> 1.0)
165
+ io-console (0.8.1)
166
+ irb (1.15.2)
167
+ pp (>= 0.6.0)
168
+ rdoc (>= 4.0.0)
169
+ reline (>= 0.4.2)
170
+ jmespath (1.6.2)
171
+ json (2.13.2)
172
+ jwt (2.10.2)
173
+ base64
174
+ liquid (5.8.7)
175
+ bigdecimal
176
+ strscan (>= 3.1.1)
177
+ listen (3.9.0)
178
+ rb-fsevent (~> 0.10, >= 0.10.3)
179
+ rb-inotify (~> 0.9, >= 0.9.10)
180
+ logger (1.7.0)
181
+ loofah (2.24.1)
182
+ crass (~> 1.0.2)
183
+ nokogiri (>= 1.12.0)
184
+ mail (2.8.1)
185
+ mini_mime (>= 0.1.1)
186
+ net-imap
187
+ net-pop
188
+ net-smtp
189
+ marcel (1.0.4)
190
+ materialize-sass (1.0.0.1)
191
+ autoprefixer-rails (>= 6.0.3)
192
+ mime-types (3.7.0)
193
+ logger
194
+ mime-types-data (~> 3.2025, >= 3.2025.0507)
195
+ mime-types-data (3.2025.0722)
196
+ mini_mime (1.1.5)
197
+ minitest (5.25.5)
198
+ minitest-rails (7.2.0)
199
+ minitest (~> 5.20)
200
+ railties (>= 7.2.0, < 8.0.0)
201
+ minitest-reporters (1.7.1)
202
+ ansi
203
+ builder
204
+ minitest (>= 5.0)
205
+ ruby-progressbar
206
+ mocha (2.7.1)
207
+ ruby2_keywords (>= 0.0.5)
208
+ mongo (2.21.2)
209
+ base64
210
+ bson (>= 4.14.1, < 6.0.0)
211
+ mongoid (9.0.7)
212
+ activemodel (>= 5.1, < 8.1, != 7.0.0)
213
+ concurrent-ruby (>= 1.0.5, < 2.0)
214
+ mongo (>= 2.18.0, < 3.0.0)
215
+ net-http (0.6.0)
216
+ uri
217
+ net-imap (0.5.9)
218
+ date
219
+ net-protocol
220
+ net-pop (0.1.2)
221
+ net-protocol
222
+ net-protocol (0.2.2)
223
+ timeout
224
+ net-smtp (0.5.1)
225
+ net-protocol
226
+ netrc (0.11.0)
227
+ nio4r (2.7.4)
228
+ nokogiri (1.18.9-aarch64-linux-gnu)
229
+ racc (~> 1.4)
230
+ nokogiri (1.18.9-aarch64-linux-musl)
231
+ racc (~> 1.4)
232
+ nokogiri (1.18.9-arm-linux-gnu)
233
+ racc (~> 1.4)
234
+ nokogiri (1.18.9-arm-linux-musl)
235
+ racc (~> 1.4)
236
+ nokogiri (1.18.9-arm64-darwin)
237
+ racc (~> 1.4)
238
+ nokogiri (1.18.9-x86_64-darwin)
239
+ racc (~> 1.4)
240
+ nokogiri (1.18.9-x86_64-linux-gnu)
241
+ racc (~> 1.4)
242
+ nokogiri (1.18.9-x86_64-linux-musl)
243
+ racc (~> 1.4)
244
+ power_assert (2.0.5)
245
+ pp (0.6.2)
246
+ prettyprint
247
+ prettyprint (0.2.0)
248
+ psych (5.2.6)
249
+ date
250
+ stringio
251
+ public_suffix (6.0.2)
252
+ racc (1.8.1)
253
+ rack (3.1.16)
254
+ rack-session (2.1.1)
255
+ base64 (>= 0.1.0)
256
+ rack (>= 3.0.0)
257
+ rack-test (2.2.0)
258
+ rack (>= 1.3)
259
+ rackup (2.2.1)
260
+ rack (>= 3)
261
+ rails (7.2.2.1)
262
+ actioncable (= 7.2.2.1)
263
+ actionmailbox (= 7.2.2.1)
264
+ actionmailer (= 7.2.2.1)
265
+ actionpack (= 7.2.2.1)
266
+ actiontext (= 7.2.2.1)
267
+ actionview (= 7.2.2.1)
268
+ activejob (= 7.2.2.1)
269
+ activemodel (= 7.2.2.1)
270
+ activerecord (= 7.2.2.1)
271
+ activestorage (= 7.2.2.1)
272
+ activesupport (= 7.2.2.1)
273
+ bundler (>= 1.15.0)
274
+ railties (= 7.2.2.1)
275
+ rails-dom-testing (2.3.0)
276
+ activesupport (>= 5.0.0)
277
+ minitest
278
+ nokogiri (>= 1.6)
279
+ rails-html-sanitizer (1.6.2)
280
+ loofah (~> 2.21)
281
+ nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
282
+ railties (7.2.2.1)
283
+ actionpack (= 7.2.2.1)
284
+ activesupport (= 7.2.2.1)
285
+ irb (~> 1.13)
286
+ rackup (>= 1.0.0)
287
+ rake (>= 12.2)
288
+ thor (~> 1.0, >= 1.2.2)
289
+ zeitwerk (~> 2.6)
290
+ rake (13.3.0)
291
+ rb-fsevent (0.11.2)
292
+ rb-inotify (0.11.1)
293
+ ffi (~> 1.0)
294
+ rdoc (6.14.2)
295
+ erb
296
+ psych (>= 4.0.0)
297
+ redis (5.4.1)
298
+ redis-client (>= 0.22.0)
299
+ redis-client (0.25.1)
300
+ connection_pool
301
+ reline (0.6.2)
302
+ io-console (~> 0.5)
303
+ rest-client (2.1.0)
304
+ http-accept (>= 1.7.0, < 2.0)
305
+ http-cookie (>= 1.0.2, < 2.0)
306
+ mime-types (>= 1.16, < 4.0)
307
+ netrc (~> 0.8)
308
+ rexml (3.4.1)
309
+ ruby-progressbar (1.13.0)
310
+ ruby2_keywords (0.0.5)
311
+ sass (3.7.4)
312
+ sass-listen (~> 4.0.0)
313
+ sass-listen (4.0.0)
314
+ rb-fsevent (~> 0.9, >= 0.9.4)
315
+ rb-inotify (~> 0.9, >= 0.9.7)
316
+ sass-rails (6.0.0)
317
+ sassc-rails (~> 2.1, >= 2.1.1)
318
+ sassc (2.4.0)
319
+ ffi (~> 1.9)
320
+ sassc-rails (2.1.2)
321
+ railties (>= 4.0.0)
322
+ sassc (>= 2.0)
323
+ sprockets (> 3.0)
324
+ sprockets-rails
325
+ tilt
326
+ securerandom (0.4.1)
327
+ shoulda (4.0.0)
328
+ shoulda-context (~> 2.0)
329
+ shoulda-matchers (~> 4.0)
330
+ shoulda-context (2.0.0)
331
+ shoulda-matchers (4.5.1)
332
+ activesupport (>= 4.2.0)
333
+ simplecov (0.22.0)
334
+ docile (~> 1.1)
335
+ simplecov-html (~> 0.11)
336
+ simplecov_json_formatter (~> 0.1)
337
+ simplecov-html (0.13.2)
338
+ simplecov_json_formatter (0.1.4)
339
+ simplecov_lcov_formatter (0.9.0)
340
+ simplecov (>= 0.18)
341
+ sprockets (4.2.2)
342
+ concurrent-ruby (~> 1.0)
343
+ logger
344
+ rack (>= 2.2.4, < 4)
345
+ sprockets-rails (3.5.2)
346
+ actionpack (>= 6.1)
347
+ activesupport (>= 6.1)
348
+ sprockets (>= 3.0.0)
349
+ stringio (3.1.7)
350
+ strscan (3.1.5)
351
+ temple (0.10.4)
352
+ test-unit (3.7.0)
353
+ power_assert
354
+ thor (1.4.0)
355
+ tilt (2.6.1)
356
+ timeout (0.4.3)
357
+ twilio-ruby (7.7.0)
358
+ faraday (>= 0.9, < 3.0)
359
+ jwt (>= 1.5, < 3.0)
360
+ nokogiri (>= 1.6, < 2.0)
361
+ tzinfo (2.0.6)
362
+ concurrent-ruby (~> 1.0)
363
+ tzinfo-data (1.2025.2)
364
+ tzinfo (>= 1.0.0)
365
+ uri (1.0.3)
366
+ useragent (0.16.11)
367
+ valid_url (0.0.4)
368
+ addressable
369
+ rails
370
+ validate_url (1.0.15)
371
+ activemodel (>= 3.0.0)
372
+ public_suffix
373
+ web47core (3.2.28)
374
+ activemodel
375
+ activesupport
376
+ aws-sdk-autoscaling
377
+ cancancan
378
+ daemons
379
+ delayed_job_mongoid
380
+ haml
381
+ jwt
382
+ liquid
383
+ materialize-sass
384
+ mongoid (~> 9.0)
385
+ redis
386
+ rest-client
387
+ sass
388
+ twilio-ruby
389
+ tzinfo-data
390
+ valid_url
391
+ validate_url
392
+ webmock (3.25.1)
393
+ addressable (>= 2.8.0)
394
+ crack (>= 0.3.2)
395
+ hashdiff (>= 0.4.0, < 2.0.0)
396
+ websocket-driver (0.8.0)
397
+ base64
398
+ websocket-extensions (>= 0.1.0)
399
+ websocket-extensions (0.1.5)
400
+ zeitwerk (2.7.3)
401
+
402
+ PLATFORMS
403
+ aarch64-linux-gnu
404
+ aarch64-linux-musl
405
+ arm-linux-gnu
406
+ arm-linux-musl
407
+ arm64-darwin
408
+ x86_64-darwin
409
+ x86_64-linux-gnu
410
+ x86_64-linux-musl
411
+
412
+ DEPENDENCIES
413
+ brakeman
414
+ codacy-coverage
415
+ database_cleaner-mongoid
416
+ factory_bot
417
+ factory_bot_rails
418
+ listen
419
+ minitest (~> 5.0)
420
+ minitest-rails
421
+ minitest-reporters
422
+ mocha
423
+ rails (~> 7.2.2)
424
+ railties
425
+ rake
426
+ sass-rails
427
+ shoulda (~> 4.0.0)
428
+ shoulda-context
429
+ shoulda-matchers
430
+ simplecov
431
+ simplecov_lcov_formatter
432
+ test-unit
433
+ web47sso!
434
+ webmock
435
+
436
+ RUBY VERSION
437
+ ruby 3.2.3p157
438
+
439
+ BUNDLED WITH
440
+ 2.5.13
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 App47
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2025 Chris Schroeder
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,68 @@
1
+ # web47sso
2
+ Hold the simple SSO implementation used by several apps. This will serve as three (3) main functions.
3
+
4
+ 1. Admin UI to manage SSO configurations for the system, i.e., not tied to an account.
5
+ 2. Models to support the ORM as well as interactions with the SSO service.
6
+ 3. Basic controller for performing authorization.
7
+
8
+ ## Badges
9
+ * Codacy - [![Codacy Badge](https://app.codacy.com/project/badge/Grade/d9420a04ebac4c7aa50faed2883cd58c)](https://app.codacy.com?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
10
+ * CircleCI - [![CircleCI](https://dl.circleci.com/status-badge/img/gh/App47/web47sso/tree/main.svg?style=svg&circle-token=CCIPRJ_59P576jtrfpKhFpFL3JKZa_ad21601dbfab9b3f6909edb090366c01eef91806)](https://dl.circleci.com/status-badge/redirect/gh/App47/web47sso/tree/main)
11
+
12
+ ## Requirements
13
+
14
+ * Ruby 3.2.3
15
+
16
+ ### Working with Bundler and RBENV
17
+
18
+ This project manages [RBENV](https://github.com/rbenv/rbenv) and manages dependencies via [Bundler](http://gembundler.com/).
19
+
20
+ You must first [install RBENV](https://github.com/rbenv/rbenv#installation).
21
+ Then install Ruby 3.2.3 via RBENV
22
+ ``` shell script
23
+ rbenv install 3.2.3
24
+ ```
25
+ You'll now notice that this project (as well as other App47 ones) contains a .ruby-version file, which is executed upon opening the project's root directory in a terminal (and IDE's like RubyMine). The .ruby-version file simply states `2.7.0` which tells RBENV to ensure the Ruby version to use for this project is 2.7.0.
26
+
27
+ Please note, your Ruby `3.2.3` version might need bundler installed:
28
+ ``` shell script
29
+ gem install bundler -v 2.5.4
30
+ ```
31
+
32
+ To set up this project's dependencies, which are defined in the file, `Gemfile`, you should first run
33
+ ``` shell script
34
+ bundle install
35
+ ```
36
+
37
+ ## Development
38
+
39
+ Your `RubyMine` environment should be setup now, however to verify all is well, please run the test suite
40
+ ``` shell script
41
+ bundle exec rake test
42
+ ```
43
+
44
+ ## Deployment
45
+ The `web47core` project is a gem that will be deployed via [Ruby Gems](https://rubygems.org). When an update is ready, the following steps should be followed
46
+
47
+ 1. Build the gem `gem build web47core.gemspec`
48
+ 2. Post the gem to the DevOps channel in slack, ask for it to be added to the S3 repo.
49
+
50
+ ## Usage
51
+ ### Importing the gem
52
+ To use the `web47core` gem in a project, first add the gem to your Gemfile in one of two ways
53
+
54
+ Using the gem from [Ruby Gems](https://rubygems.org)
55
+ ``` rbenv-gemsets
56
+ gem 'web47core'
57
+ ```
58
+
59
+ If you need the gem immediately or need to pull from development branch, you can use the git repo
60
+ ``` rbenv-gemsets
61
+ gem 'web47core', git: 'git@github.com:App47/web47core.git', branch: :master
62
+ ```
63
+ or from the develop branch
64
+ ``` rbenv-gemsets
65
+ gem 'web47core', git: 'git@github.com:App47/web47core.git', branch: :develop
66
+ ```
67
+
68
+ Please do not ship to production code using the git repo, as the production servers will not have keys to pull from the web47core repo.
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+ require "rake/testtask"
3
+
4
+ Rake::TestTask.new(:test) do |t|
5
+ t.libs << "test"
6
+ t.libs << "lib"
7
+ t.test_files = FileList["test/**/*_test.rb"]
8
+ end
9
+
10
+ task :default => :test
@@ -0,0 +1,3 @@
1
+ //= link ../stylesheets .scss
2
+ //= link ../javascript .coffee
3
+ //= link ../images .png
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ #
4
+ # Manage SSO Google servers
5
+ #
6
+ class SsoGoogleServersController < SsoServersController
7
+ load_and_authorize_resource :sso_google_server, class: 'SsoGoogleServer'
8
+ attr_accessor :sso_google_server
9
+
10
+ def new
11
+ @sso_server = sso_google_server
12
+ end
13
+
14
+ def edit
15
+ @sso_server = sso_google_server
16
+ end
17
+
18
+ def update
19
+ @sso_server = sso_google_server
20
+ super
21
+ end
22
+
23
+ def create
24
+ @sso_server = sso_google_server
25
+ super
26
+ end
27
+
28
+ private
29
+
30
+ def sso_server
31
+ @sso_server ||= sso_google_server
32
+ end
33
+
34
+ def sso_server_params
35
+ params[:sso_server] ||= params[:sso_google_server]
36
+ super
37
+ end
38
+
39
+ alias sso_google_server_params sso_server_params
40
+
41
+ def allowed_param_names
42
+ SsoGoogleServer.allowed_param_names
43
+ end
44
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cron
4
+ #
5
+ # Trim Secure requests
6
+ #
7
+ class TrimSecureRequests < TrimCollection
8
+ # @abstract Return the collection
9
+ # @return Mongoid::Collection
10
+ def collection
11
+ SecureRequest.all
12
+ end
13
+
14
+ # @abstract Allowed time the amount of time allowed to exist before deleting
15
+ # @return Time
16
+ def allowed_time
17
+ 7.days.ago
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,16 @@
1
+ .container
2
+ .row
3
+ .col-sm-12.col-md-6
4
+ .row
5
+ .col-sm-12
6
+ %h2 Sso Server
7
+ .row
8
+ = html5_text_field(@sso_server, :name)
9
+ = html5_checkbox(@sso_server, :active)
10
+ .col-sm-12.col-md-6
11
+ .row
12
+ .col-sm-12
13
+ %h2 Google Oauth
14
+ .row
15
+ = html5_text_field(@sso_server, :client_id, classes: %w[col-sm-12])
16
+ = html5_text_field(@sso_server, :client_secret, classes: %w[col-sm-12])
@@ -0,0 +1,10 @@
1
+ - title t('.title', name: @sso_server.name)
2
+ - content_for :breadcrumbs do
3
+ =breadcrumb_step(sso_servers_path, t('sso_servers.index.title'))
4
+
5
+ %form{action: sso_google_server_path(@sso_server), method: :post}
6
+ %input{type: :hidden, value: form_authenticity_token, name: :authenticity_token}
7
+ %input{type: :hidden, name: '_method', value: :put}
8
+ .card
9
+ .card-body= render 'form'
10
+ .card-footer= render 'common/form_actions', form_cancel_path: sso_servers_path
@@ -0,0 +1,9 @@
1
+ - title t('.title')
2
+ - content_for :breadcrumbs do
3
+ =breadcrumb_step(sso_servers_path, t('sso_servers.index.title'))
4
+
5
+ %form{action: sso_google_servers_path, method: :post}
6
+ %input{type: :hidden, value: form_authenticity_token, name: :authenticity_token}
7
+ .card
8
+ .card-body= render 'form'
9
+ .card-footer= render 'common/form_actions', form_cancel_path: sso_servers_path
@@ -0,0 +1,28 @@
1
+ - title t('.title')
2
+ = multiple_floating_action_button do
3
+ = add_floating_action_link(SsoGoogleServer, new_sso_google_server_path)
4
+ .card
5
+ .card-body
6
+ .table-responsive.text-nowrap
7
+ %table.table.card-table.border.table-striped
8
+ %thead
9
+ %tr
10
+ %th Name
11
+ %th Type
12
+ %th Active
13
+ %th Actions
14
+ %tbody.table-border-bottom-0
15
+ - @sso_servers.each do |s|
16
+ %tr
17
+ %td= s.name
18
+ %td= s.display_name
19
+ %td
20
+ - if s.active?
21
+ =remix_icon('checkbox-circle', classes: %w(text-success))
22
+ - else
23
+ &nbsp
24
+ %td
25
+ =dropdown_menu do
26
+ =edit_dropdown_item(s, edit_sso_server_path(s))
27
+ =delete_dropdown_item(s, sso_server_path(s))
28
+