clavis 0.7.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.
- checksums.yaml +7 -0
- data/.actrc +4 -0
- data/.cursor/rules/ruby-gem.mdc +49 -0
- data/.gemignore +6 -0
- data/.rspec +3 -0
- data/.rubocop.yml +88 -0
- data/.vscode/settings.json +22 -0
- data/CHANGELOG.md +127 -0
- data/CODE_OF_CONDUCT.md +3 -0
- data/LICENSE.txt +21 -0
- data/README.md +838 -0
- data/Rakefile +341 -0
- data/UPGRADE.md +57 -0
- data/app/assets/stylesheets/clavis.css +133 -0
- data/app/controllers/clavis/auth_controller.rb +133 -0
- data/config/database.yml +16 -0
- data/config/routes.rb +49 -0
- data/docs/SECURITY.md +340 -0
- data/docs/TESTING.md +78 -0
- data/docs/integration.md +272 -0
- data/error_handling.md +355 -0
- data/file_structure.md +221 -0
- data/gemfiles/rails_80.gemfile +17 -0
- data/gemfiles/rails_80.gemfile.lock +286 -0
- data/implementation_plan.md +523 -0
- data/lib/clavis/configuration.rb +196 -0
- data/lib/clavis/controllers/concerns/authentication.rb +232 -0
- data/lib/clavis/controllers/concerns/session_management.rb +117 -0
- data/lib/clavis/engine.rb +191 -0
- data/lib/clavis/errors.rb +205 -0
- data/lib/clavis/logging.rb +116 -0
- data/lib/clavis/models/concerns/oauth_authenticatable.rb +169 -0
- data/lib/clavis/oauth_identity.rb +174 -0
- data/lib/clavis/providers/apple.rb +135 -0
- data/lib/clavis/providers/base.rb +432 -0
- data/lib/clavis/providers/custom_provider_example.rb +57 -0
- data/lib/clavis/providers/facebook.rb +84 -0
- data/lib/clavis/providers/generic.rb +63 -0
- data/lib/clavis/providers/github.rb +87 -0
- data/lib/clavis/providers/google.rb +98 -0
- data/lib/clavis/providers/microsoft.rb +57 -0
- data/lib/clavis/security/csrf_protection.rb +79 -0
- data/lib/clavis/security/https_enforcer.rb +90 -0
- data/lib/clavis/security/input_validator.rb +192 -0
- data/lib/clavis/security/parameter_filter.rb +64 -0
- data/lib/clavis/security/rate_limiter.rb +109 -0
- data/lib/clavis/security/redirect_uri_validator.rb +124 -0
- data/lib/clavis/security/session_manager.rb +220 -0
- data/lib/clavis/security/token_storage.rb +114 -0
- data/lib/clavis/user_info_normalizer.rb +74 -0
- data/lib/clavis/utils/nonce_store.rb +14 -0
- data/lib/clavis/utils/secure_token.rb +17 -0
- data/lib/clavis/utils/state_store.rb +18 -0
- data/lib/clavis/version.rb +6 -0
- data/lib/clavis/view_helpers.rb +260 -0
- data/lib/clavis.rb +132 -0
- data/lib/generators/clavis/controller/controller_generator.rb +48 -0
- data/lib/generators/clavis/controller/templates/controller.rb.tt +137 -0
- data/lib/generators/clavis/controller/templates/views/login.html.erb.tt +145 -0
- data/lib/generators/clavis/install_generator.rb +182 -0
- data/lib/generators/clavis/templates/add_oauth_to_users.rb +28 -0
- data/lib/generators/clavis/templates/clavis.css +133 -0
- data/lib/generators/clavis/templates/initializer.rb +47 -0
- data/lib/generators/clavis/templates/initializer.rb.tt +76 -0
- data/lib/generators/clavis/templates/migration.rb +18 -0
- data/lib/generators/clavis/templates/migration.rb.tt +16 -0
- data/lib/generators/clavis/user_method/user_method_generator.rb +219 -0
- data/lib/tasks/provider_verification.rake +77 -0
- data/llms.md +487 -0
- data/log/development.log +20 -0
- data/log/test.log +0 -0
- data/sig/clavis.rbs +4 -0
- data/testing_plan.md +710 -0
- metadata +258 -0
metadata
ADDED
@@ -0,0 +1,258 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: clavis
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.7.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Clayton Lengel-Zigich
|
8
|
+
bindir: exe
|
9
|
+
cert_chain: []
|
10
|
+
date: 2025-03-20 00:00:00.000000000 Z
|
11
|
+
dependencies:
|
12
|
+
- !ruby/object:Gem::Dependency
|
13
|
+
name: faraday
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
15
|
+
requirements:
|
16
|
+
- - "~>"
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: '2.7'
|
19
|
+
type: :runtime
|
20
|
+
prerelease: false
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
requirements:
|
23
|
+
- - "~>"
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: '2.7'
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: jwt
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - "~>"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '2.7'
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '2.7'
|
40
|
+
- !ruby/object:Gem::Dependency
|
41
|
+
name: rack-attack
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '6.7'
|
47
|
+
type: :runtime
|
48
|
+
prerelease: false
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '6.7'
|
54
|
+
- !ruby/object:Gem::Dependency
|
55
|
+
name: rails
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '8.0'
|
61
|
+
type: :runtime
|
62
|
+
prerelease: false
|
63
|
+
version_requirements: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '8.0'
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
name: capybara
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
type: :development
|
76
|
+
prerelease: false
|
77
|
+
version_requirements: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
name: generator_spec
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
type: :development
|
90
|
+
prerelease: false
|
91
|
+
version_requirements: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
96
|
+
- !ruby/object:Gem::Dependency
|
97
|
+
name: omniauth
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - "~>"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '2.0'
|
103
|
+
type: :development
|
104
|
+
prerelease: false
|
105
|
+
version_requirements: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - "~>"
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '2.0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: rspec
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - "~>"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '3.0'
|
117
|
+
type: :development
|
118
|
+
prerelease: false
|
119
|
+
version_requirements: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - "~>"
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '3.0'
|
124
|
+
- !ruby/object:Gem::Dependency
|
125
|
+
name: rspec-rails
|
126
|
+
requirement: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - ">="
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '0'
|
131
|
+
type: :development
|
132
|
+
prerelease: false
|
133
|
+
version_requirements: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - ">="
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0'
|
138
|
+
- !ruby/object:Gem::Dependency
|
139
|
+
name: sqlite3
|
140
|
+
requirement: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '0'
|
145
|
+
type: :development
|
146
|
+
prerelease: false
|
147
|
+
version_requirements: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - ">="
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: '0'
|
152
|
+
description: A Ruby gem for OIDC and OAuth2. Easily integrate with your favorite identity
|
153
|
+
provider.
|
154
|
+
email:
|
155
|
+
- 6334+clayton@users.noreply.github.com
|
156
|
+
executables: []
|
157
|
+
extensions: []
|
158
|
+
extra_rdoc_files: []
|
159
|
+
files:
|
160
|
+
- ".actrc"
|
161
|
+
- ".cursor/rules/ruby-gem.mdc"
|
162
|
+
- ".gemignore"
|
163
|
+
- ".rspec"
|
164
|
+
- ".rubocop.yml"
|
165
|
+
- ".vscode/settings.json"
|
166
|
+
- CHANGELOG.md
|
167
|
+
- CODE_OF_CONDUCT.md
|
168
|
+
- LICENSE.txt
|
169
|
+
- README.md
|
170
|
+
- Rakefile
|
171
|
+
- UPGRADE.md
|
172
|
+
- app/assets/stylesheets/clavis.css
|
173
|
+
- app/controllers/clavis/auth_controller.rb
|
174
|
+
- config/database.yml
|
175
|
+
- config/routes.rb
|
176
|
+
- docs/SECURITY.md
|
177
|
+
- docs/TESTING.md
|
178
|
+
- docs/integration.md
|
179
|
+
- error_handling.md
|
180
|
+
- file_structure.md
|
181
|
+
- gemfiles/rails_80.gemfile
|
182
|
+
- gemfiles/rails_80.gemfile.lock
|
183
|
+
- implementation_plan.md
|
184
|
+
- lib/clavis.rb
|
185
|
+
- lib/clavis/configuration.rb
|
186
|
+
- lib/clavis/controllers/concerns/authentication.rb
|
187
|
+
- lib/clavis/controllers/concerns/session_management.rb
|
188
|
+
- lib/clavis/engine.rb
|
189
|
+
- lib/clavis/errors.rb
|
190
|
+
- lib/clavis/logging.rb
|
191
|
+
- lib/clavis/models/concerns/oauth_authenticatable.rb
|
192
|
+
- lib/clavis/oauth_identity.rb
|
193
|
+
- lib/clavis/providers/apple.rb
|
194
|
+
- lib/clavis/providers/base.rb
|
195
|
+
- lib/clavis/providers/custom_provider_example.rb
|
196
|
+
- lib/clavis/providers/facebook.rb
|
197
|
+
- lib/clavis/providers/generic.rb
|
198
|
+
- lib/clavis/providers/github.rb
|
199
|
+
- lib/clavis/providers/google.rb
|
200
|
+
- lib/clavis/providers/microsoft.rb
|
201
|
+
- lib/clavis/security/csrf_protection.rb
|
202
|
+
- lib/clavis/security/https_enforcer.rb
|
203
|
+
- lib/clavis/security/input_validator.rb
|
204
|
+
- lib/clavis/security/parameter_filter.rb
|
205
|
+
- lib/clavis/security/rate_limiter.rb
|
206
|
+
- lib/clavis/security/redirect_uri_validator.rb
|
207
|
+
- lib/clavis/security/session_manager.rb
|
208
|
+
- lib/clavis/security/token_storage.rb
|
209
|
+
- lib/clavis/user_info_normalizer.rb
|
210
|
+
- lib/clavis/utils/nonce_store.rb
|
211
|
+
- lib/clavis/utils/secure_token.rb
|
212
|
+
- lib/clavis/utils/state_store.rb
|
213
|
+
- lib/clavis/version.rb
|
214
|
+
- lib/clavis/view_helpers.rb
|
215
|
+
- lib/generators/clavis/controller/controller_generator.rb
|
216
|
+
- lib/generators/clavis/controller/templates/controller.rb.tt
|
217
|
+
- lib/generators/clavis/controller/templates/views/login.html.erb.tt
|
218
|
+
- lib/generators/clavis/install_generator.rb
|
219
|
+
- lib/generators/clavis/templates/add_oauth_to_users.rb
|
220
|
+
- lib/generators/clavis/templates/clavis.css
|
221
|
+
- lib/generators/clavis/templates/initializer.rb
|
222
|
+
- lib/generators/clavis/templates/initializer.rb.tt
|
223
|
+
- lib/generators/clavis/templates/migration.rb
|
224
|
+
- lib/generators/clavis/templates/migration.rb.tt
|
225
|
+
- lib/generators/clavis/user_method/user_method_generator.rb
|
226
|
+
- lib/tasks/provider_verification.rake
|
227
|
+
- llms.md
|
228
|
+
- log/development.log
|
229
|
+
- log/test.log
|
230
|
+
- sig/clavis.rbs
|
231
|
+
- testing_plan.md
|
232
|
+
homepage: https://github.com/clayton/clavis
|
233
|
+
licenses:
|
234
|
+
- MIT
|
235
|
+
metadata:
|
236
|
+
allowed_push_host: https://rubygems.org
|
237
|
+
homepage_uri: https://github.com/clayton/clavis
|
238
|
+
source_code_uri: https://github.com/clayton/clavis
|
239
|
+
changelog_uri: https://github.com/clayton/clavis/blob/main/CHANGELOG.md
|
240
|
+
rubygems_mfa_required: 'true'
|
241
|
+
rdoc_options: []
|
242
|
+
require_paths:
|
243
|
+
- lib
|
244
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
245
|
+
requirements:
|
246
|
+
- - ">="
|
247
|
+
- !ruby/object:Gem::Version
|
248
|
+
version: 3.3.0
|
249
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
250
|
+
requirements:
|
251
|
+
- - ">="
|
252
|
+
- !ruby/object:Gem::Version
|
253
|
+
version: '0'
|
254
|
+
requirements: []
|
255
|
+
rubygems_version: 3.6.2
|
256
|
+
specification_version: 4
|
257
|
+
summary: A Ruby gem for OIDC and OAuth2.
|
258
|
+
test_files: []
|