standard_id 0.41.1 → 0.43.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +111 -0
- data/README.md +310 -17
- data/app/controllers/concerns/standard_id/inertia_rendering.rb +23 -5
- data/app/controllers/concerns/standard_id/lifecycle_hooks.rb +1 -0
- data/app/controllers/concerns/standard_id/passwordless_flow.rb +11 -2
- data/app/controllers/concerns/standard_id/rate_limit_handling.rb +5 -19
- data/app/controllers/concerns/standard_id/social_authentication.rb +1 -1
- data/app/controllers/standard_id/api/oauth/callback/providers_controller.rb +1 -8
- data/app/controllers/standard_id/web/login_controller.rb +1 -2
- data/app/controllers/standard_id/web/login_verify_controller.rb +2 -0
- data/app/controllers/standard_id/web/verify_email/start_controller.rb +12 -8
- data/app/controllers/standard_id/web/verify_phone/start_controller.rb +12 -8
- data/app/jobs/standard_id/cleanup_all_job.rb +46 -0
- data/app/jobs/standard_id/password_reset_delivery_job.rb +1 -1
- data/app/models/concerns/standard_id/credentiable.rb +8 -1
- data/app/models/standard_id/application_record.rb +26 -0
- data/app/models/standard_id/authorization_code.rb +3 -1
- data/app/models/standard_id/identifier.rb +1 -0
- data/app/models/standard_id/session.rb +2 -1
- data/app/views/standard_id/web/login/_social_buttons.html.erb +2 -2
- data/app/views/standard_id/web/login/show.html.erb +5 -5
- data/app/views/standard_id/web/signup/show.html.erb +3 -3
- data/db/migrate/20250830000000_create_standard_id_client_applications.rb +2 -0
- data/db/migrate/20250830171553_create_standard_id_password_credentials.rb +2 -0
- data/db/migrate/20250830232800_create_standard_id_identifiers.rb +2 -0
- data/db/migrate/20250831075703_create_standard_id_credentials.rb +2 -0
- data/db/migrate/20250831154635_create_standard_id_sessions.rb +2 -0
- data/db/migrate/20250901134520_create_standard_id_client_secret_credentials.rb +2 -0
- data/db/migrate/20250903063000_create_standard_id_authorization_codes.rb +2 -0
- data/db/migrate/20250907090000_create_standard_id_code_challenges.rb +2 -0
- data/db/migrate/20260311100000_create_standard_id_refresh_tokens.rb +2 -0
- data/db/migrate/20260414200000_add_target_created_at_index_to_code_challenges.rb +1 -0
- data/db/migrate/20260416180511_add_partial_indexes_for_active_session_and_challenge_lookups.rb +25 -8
- data/db/migrate/20260611000000_create_standard_id_client_grants.rb +2 -0
- data/lib/generators/standard_id/install/install_generator.rb +64 -3
- data/lib/generators/standard_id/install/templates/standard_id.rb +41 -13
- data/lib/standard_id/checks/migrations.rb +61 -0
- data/lib/standard_id/config/schema.rb +34 -20
- data/lib/standard_id/config_schema.rb +94 -6
- data/lib/standard_id/deprecator.rb +17 -0
- data/lib/standard_id/engine.rb +22 -0
- data/lib/standard_id/events/subscribers/passwordless_delivery_subscriber.rb +3 -0
- data/lib/standard_id/instrumentation.rb +49 -0
- data/lib/standard_id/migration_check.rb +183 -0
- data/lib/standard_id/migration_helpers.rb +65 -0
- data/lib/standard_id/oauth/audience_profile_resolver.rb +8 -2
- data/lib/standard_id/oauth/refresh_token_flow.rb +1 -1
- data/lib/standard_id/oauth/token_grant_flow.rb +25 -3
- data/lib/standard_id/otp.rb +20 -28
- data/lib/standard_id/passwordless/base_strategy.rb +18 -14
- data/lib/standard_id/passwordless/email_strategy.rb +0 -5
- data/lib/standard_id/passwordless/sms_strategy.rb +0 -4
- data/lib/standard_id/provider_registry.rb +95 -5
- data/lib/standard_id/providers/base.rb +222 -8
- data/lib/standard_id/providers/plugin_railtie.rb +59 -0
- data/lib/standard_id/scope_config.rb +43 -26
- data/lib/standard_id/testing/config_helpers.rb +55 -0
- data/lib/standard_id/testing/provider_examples.rb +117 -0
- data/lib/standard_id/testing.rb +2 -0
- data/lib/standard_id/version.rb +1 -1
- data/lib/standard_id.rb +26 -0
- metadata +25 -17
- data/config/initializers/migration_helpers.rb +0 -32
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: standard_id
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.43.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jaryl Sim
|
|
@@ -57,20 +57,6 @@ dependencies:
|
|
|
57
57
|
- - "<"
|
|
58
58
|
- !ruby/object:Gem::Version
|
|
59
59
|
version: '4'
|
|
60
|
-
- !ruby/object:Gem::Dependency
|
|
61
|
-
name: ostruct
|
|
62
|
-
requirement: !ruby/object:Gem::Requirement
|
|
63
|
-
requirements:
|
|
64
|
-
- - ">="
|
|
65
|
-
- !ruby/object:Gem::Version
|
|
66
|
-
version: '0'
|
|
67
|
-
type: :runtime
|
|
68
|
-
prerelease: false
|
|
69
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
70
|
-
requirements:
|
|
71
|
-
- - ">="
|
|
72
|
-
- !ruby/object:Gem::Version
|
|
73
|
-
version: '0'
|
|
74
60
|
- !ruby/object:Gem::Dependency
|
|
75
61
|
name: concurrent-ruby
|
|
76
62
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -99,6 +85,20 @@ dependencies:
|
|
|
99
85
|
- - "~>"
|
|
100
86
|
- !ruby/object:Gem::Version
|
|
101
87
|
version: '6.5'
|
|
88
|
+
- !ruby/object:Gem::Dependency
|
|
89
|
+
name: ostruct
|
|
90
|
+
requirement: !ruby/object:Gem::Requirement
|
|
91
|
+
requirements:
|
|
92
|
+
- - ">="
|
|
93
|
+
- !ruby/object:Gem::Version
|
|
94
|
+
version: '0'
|
|
95
|
+
type: :development
|
|
96
|
+
prerelease: false
|
|
97
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
98
|
+
requirements:
|
|
99
|
+
- - ">="
|
|
100
|
+
- !ruby/object:Gem::Version
|
|
101
|
+
version: '0'
|
|
102
102
|
description: StandardId is an authentication engine that provides a complete, secure-by-default
|
|
103
103
|
solution for identity management, reducing boilerplate and eliminating common security
|
|
104
104
|
pitfalls.
|
|
@@ -166,6 +166,7 @@ files:
|
|
|
166
166
|
- app/forms/standard_id/web/signup_form.rb
|
|
167
167
|
- app/helpers/standard_id/application_helper.rb
|
|
168
168
|
- app/jobs/standard_id/application_job.rb
|
|
169
|
+
- app/jobs/standard_id/cleanup_all_job.rb
|
|
169
170
|
- app/jobs/standard_id/cleanup_expired_authorization_codes_job.rb
|
|
170
171
|
- app/jobs/standard_id/cleanup_expired_code_challenges_job.rb
|
|
171
172
|
- app/jobs/standard_id/cleanup_expired_refresh_tokens_job.rb
|
|
@@ -213,7 +214,6 @@ files:
|
|
|
213
214
|
- app/views/standard_id/web/signup/show.html.erb
|
|
214
215
|
- config/brakeman.ignore
|
|
215
216
|
- config/initializers/generators.rb
|
|
216
|
-
- config/initializers/migration_helpers.rb
|
|
217
217
|
- config/routes/api.rb
|
|
218
218
|
- config/routes/web.rb
|
|
219
219
|
- db/migrate/20250830000000_create_standard_id_client_applications.rb
|
|
@@ -244,11 +244,13 @@ files:
|
|
|
244
244
|
- lib/standard_id/association_strict_loading.rb
|
|
245
245
|
- lib/standard_id/authorization_bypass.rb
|
|
246
246
|
- lib/standard_id/bearer_token_extraction.rb
|
|
247
|
+
- lib/standard_id/checks/migrations.rb
|
|
247
248
|
- lib/standard_id/config/callable_validator.rb
|
|
248
249
|
- lib/standard_id/config/schema.rb
|
|
249
250
|
- lib/standard_id/config/scope_claims_validator.rb
|
|
250
251
|
- lib/standard_id/config_schema.rb
|
|
251
252
|
- lib/standard_id/current_attributes.rb
|
|
253
|
+
- lib/standard_id/deprecator.rb
|
|
252
254
|
- lib/standard_id/engine.rb
|
|
253
255
|
- lib/standard_id/errors.rb
|
|
254
256
|
- lib/standard_id/events.rb
|
|
@@ -261,7 +263,10 @@ files:
|
|
|
261
263
|
- lib/standard_id/events/subscribers/password_reset_delivery_subscriber.rb
|
|
262
264
|
- lib/standard_id/events/subscribers/passwordless_delivery_subscriber.rb
|
|
263
265
|
- lib/standard_id/http_client.rb
|
|
266
|
+
- lib/standard_id/instrumentation.rb
|
|
264
267
|
- lib/standard_id/jwt_service.rb
|
|
268
|
+
- lib/standard_id/migration_check.rb
|
|
269
|
+
- lib/standard_id/migration_helpers.rb
|
|
265
270
|
- lib/standard_id/oauth/audience_profile_resolver.rb
|
|
266
271
|
- lib/standard_id/oauth/audience_scope_resolver.rb
|
|
267
272
|
- lib/standard_id/oauth/authorization_code_authorization_flow.rb
|
|
@@ -292,17 +297,20 @@ files:
|
|
|
292
297
|
- lib/standard_id/passwordless/verification_service.rb
|
|
293
298
|
- lib/standard_id/provider_registry.rb
|
|
294
299
|
- lib/standard_id/providers/base.rb
|
|
300
|
+
- lib/standard_id/providers/plugin_railtie.rb
|
|
295
301
|
- lib/standard_id/rate_limit_store.rb
|
|
296
302
|
- lib/standard_id/routing.rb
|
|
297
303
|
- lib/standard_id/scope_config.rb
|
|
298
304
|
- lib/standard_id/session_type_resolver.rb
|
|
299
305
|
- lib/standard_id/testing.rb
|
|
300
306
|
- lib/standard_id/testing/authentication_helpers.rb
|
|
307
|
+
- lib/standard_id/testing/config_helpers.rb
|
|
301
308
|
- lib/standard_id/testing/factories/credentials.rb
|
|
302
309
|
- lib/standard_id/testing/factories/identifiers.rb
|
|
303
310
|
- lib/standard_id/testing/factories/oauth.rb
|
|
304
311
|
- lib/standard_id/testing/factories/sessions.rb
|
|
305
312
|
- lib/standard_id/testing/factory_bot.rb
|
|
313
|
+
- lib/standard_id/testing/provider_examples.rb
|
|
306
314
|
- lib/standard_id/testing/request_helpers.rb
|
|
307
315
|
- lib/standard_id/utils/callable_parameter_filter.rb
|
|
308
316
|
- lib/standard_id/utils/ip_normalizer.rb
|
|
@@ -337,5 +345,5 @@ requirements: []
|
|
|
337
345
|
rubygems_version: 4.0.3
|
|
338
346
|
specification_version: 4
|
|
339
347
|
summary: A comprehensive authentication engine for Rails, built on the security primitives
|
|
340
|
-
introduced in Rails
|
|
348
|
+
introduced in Rails 8.
|
|
341
349
|
test_files: []
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# Monkey patch ActiveRecord::Migration to add primary_key_type and foreign_key_type methods
|
|
2
|
-
module ActiveRecord
|
|
3
|
-
class Migration
|
|
4
|
-
class << self
|
|
5
|
-
def primary_and_foreign_key_types
|
|
6
|
-
config = Rails.configuration.generators
|
|
7
|
-
config.options[config.orm][:primary_key_type] || :bigint
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
def primary_key_type
|
|
11
|
-
primary_and_foreign_key_types
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def foreign_key_type
|
|
15
|
-
primary_and_foreign_key_types
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
# Make these methods available as instance methods too
|
|
20
|
-
def primary_and_foreign_key_types
|
|
21
|
-
self.class.primary_and_foreign_key_types
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
def primary_key_type
|
|
25
|
-
self.class.primary_key_type
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
def foreign_key_type
|
|
29
|
-
self.class.foreign_key_type
|
|
30
|
-
end
|
|
31
|
-
end
|
|
32
|
-
end
|