propel_authentication 0.1.2 → 0.1.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 398a15d5453a8bf229939184ce6bc1dc8ed81a11174b914e0d0986b246c7d7a4
4
- data.tar.gz: 40280ffa68a4bc3623ee664bb5149aedff359cf1ee0ad8985532a0b5af6837a2
3
+ metadata.gz: 77ad0bd9c772c1e89c434316b2cc4317e92ab6cfbddcb08af226441e1bcfca27
4
+ data.tar.gz: b7b09da07c940568f77a4543f03a0b5b2b19f038f889ee6f743ee1d7d1741482
5
5
  SHA512:
6
- metadata.gz: eb69b2697271838f9b17468aa59ae8a885a44cf832a4123e0a7dba280d80d1099d14af430685d1d6f05907f914d37a83887dd27d3ae57b4a2bbfb8cd69f688f0
7
- data.tar.gz: '086ecddb5806eb00028dec493b601537935b7bf944a41e773d39c268fe495729693eae695840826751ded9650161e7e5abe35eab40d3ef777a68a17182b3bdc0'
6
+ metadata.gz: c1df8a43f240fe728f7c00fc10cda8c85362ed0919a8ad89c58c62c89bb4d68536c71197f52f2abf334cab960847bf53c5992ec0a4f56d25436dec59b05abca8
7
+ data.tar.gz: dd94fc927e86f1192f9622c75c6299253eb52d7b48029df725819ff3e5719471f12a50fbe07a9fe30c49373bbebc53455f1845c656cc31e8d5404eb8a85a21ce
@@ -0,0 +1,134 @@
1
+ # frozen_string_literal: true
2
+
3
+ ##
4
+ # Module providing configuration detection and validation for PropelAuth generators
5
+ #
6
+ module PropelAuth
7
+ module ConfigurationMethods
8
+
9
+ # Shared class options across all PropelAuth generators
10
+ def self.included(base)
11
+ base.class_option :namespace,
12
+ type: :string,
13
+ default: nil,
14
+ desc: "Authentication namespace (e.g., 'api', 'admin_api'). Use 'none' for no namespace. Defaults to PropelAuth configuration."
15
+
16
+ base.class_option :version,
17
+ type: :string,
18
+ default: nil,
19
+ desc: "Authentication version (e.g., 'v1', 'v2'). Use 'none' for no versioning. Defaults to PropelAuth configuration."
20
+
21
+ # Legacy support for existing --api-version option
22
+ base.class_option :api_version,
23
+ type: :string,
24
+ default: nil,
25
+ desc: "Legacy: Use --version instead. Authentication version (e.g., 'v1', 'v2')."
26
+ end
27
+
28
+ protected
29
+
30
+ # Initialize shared PropelAuth settings used across all generators
31
+ def initialize_propel_auth_settings
32
+ @auth_namespace = determine_auth_namespace
33
+ @auth_version = determine_auth_version
34
+ end
35
+
36
+ # Determine the authentication namespace to use
37
+ # Priority order:
38
+ # 1. Command line option (--namespace)
39
+ # 2. PropelAuth configuration (if exists)
40
+ # 3. Default fallback (nil for clean URLs like /login)
41
+ def determine_auth_namespace
42
+ if options[:namespace] == 'none'
43
+ return nil
44
+ end
45
+
46
+ if options[:namespace].present?
47
+ return options[:namespace]
48
+ end
49
+
50
+ # Try to read from PropelAuth configuration
51
+ begin
52
+ if defined?(PropelAuth) && PropelAuth.configuration.respond_to?(:namespace)
53
+ config_namespace = PropelAuth.configuration.namespace
54
+ return config_namespace if config_namespace.present? && config_namespace != 'none'
55
+ end
56
+ rescue => e
57
+ # Configuration not available, continue to default
58
+ end
59
+
60
+ # Default fallback - no namespace for clean URLs
61
+ nil
62
+ end
63
+
64
+ # Determine the authentication version to use
65
+ # Priority order:
66
+ # 1. Command line option (--version or legacy --api-version)
67
+ # 2. PropelAuth configuration (if exists)
68
+ # 3. Default fallback (nil for clean URLs like /login)
69
+ def determine_auth_version
70
+ # Check for 'none' in either option
71
+ if options[:version] == 'none' || options[:api_version] == 'none'
72
+ return nil
73
+ end
74
+
75
+ # Check explicit version option first
76
+ if options[:version].present?
77
+ return options[:version]
78
+ end
79
+
80
+ # Check legacy api_version option
81
+ if options[:api_version].present?
82
+ return options[:api_version]
83
+ end
84
+
85
+ # Try to read from PropelAuth configuration
86
+ begin
87
+ if defined?(PropelAuth) && PropelAuth.configuration.respond_to?(:version)
88
+ config_version = PropelAuth.configuration.version
89
+ return config_version if config_version.present? && config_version != 'none'
90
+ end
91
+ rescue => e
92
+ # Configuration not available, continue to default
93
+ end
94
+
95
+ # Default fallback - no version for clean URLs
96
+ nil
97
+ end
98
+
99
+ # Display helpers for logging
100
+ def namespace_display
101
+ @auth_namespace.present? ? @auth_namespace : 'none'
102
+ end
103
+
104
+ def version_display
105
+ @auth_version.present? ? @auth_version : 'none'
106
+ end
107
+
108
+ # Authentication route path generation
109
+ def auth_route_prefix
110
+ path_parts = []
111
+ path_parts << @auth_namespace if @auth_namespace.present?
112
+ path_parts << @auth_version if @auth_version.present?
113
+ return '/' if path_parts.empty?
114
+ '/' + path_parts.join('/')
115
+ end
116
+
117
+ # Authentication controller namespace generation
118
+ def auth_controller_namespace
119
+ class_parts = []
120
+ class_parts << @auth_namespace.camelize if @auth_namespace.present?
121
+ class_parts << @auth_version.upcase if @auth_version.present?
122
+ class_parts.empty? ? 'Auth' : class_parts.join('::') + '::Auth'
123
+ end
124
+
125
+ # Authentication controller directory path
126
+ def auth_controller_directory
127
+ path_parts = ['app', 'controllers']
128
+ path_parts << @auth_namespace if @auth_namespace.present?
129
+ path_parts << @auth_version if @auth_version.present?
130
+ path_parts << 'auth'
131
+ path_parts.join('/')
132
+ end
133
+ end
134
+ end
@@ -19,27 +19,34 @@ require_relative 'unpack_generator'
19
19
  # Like Rails' built-in generators (action_text:install, devise:install),
20
20
  # this generator is designed to be run once per application.
21
21
  #
22
+ require_relative 'core/configuration_methods'
23
+
22
24
  module PropelAuth
23
25
  class InstallGenerator < Rails::Generators::Base
24
26
  source_root File.expand_path("templates", __dir__)
25
27
  include Rails::Generators::Migration
28
+ include PropelAuth::ConfigurationMethods
26
29
 
27
30
  def self.next_migration_number(dir)
28
31
  ActiveRecord::Generators::Base.next_migration_number(dir)
29
32
  end
30
33
 
31
- desc "Generate JWT-based authentication system with complete test coverage"
32
-
33
- class_option :api_version, type: :string, default: nil,
34
- desc: "Generate API versioned routes with specified version (e.g., --api-version=v2 creates /api/v2/auth/*)"
34
+ desc "Generate JWT-based authentication system with configurable URL architecture"
35
35
 
36
36
  def copy_jwt_initializer
37
- copy_file "propel_auth.rb", "config/initializers/propel_auth.rb"
37
+ initialize_propel_auth_settings
38
+
39
+ if behavior == :revoke
40
+ remove_file "config/initializers/propel_auth.rb"
41
+ say "Removed PropelAuth configuration", :red
42
+ else
43
+ # Convert to ERB template to support configuration
44
+ template "propel_auth.rb.tt", "config/initializers/propel_auth.rb"
45
+ say "Created PropelAuth configuration with namespace: #{namespace_display}, version: #{version_display}", :green
46
+ end
38
47
  end
39
48
 
40
- def copy_propel_auth_runtime
41
- copy_file "lib/propel_auth.rb", "lib/propel_auth.rb"
42
- end
49
+
43
50
 
44
51
  def copy_authentication_models
45
52
  copy_file "user.rb", "app/models/user.rb"
@@ -59,11 +66,11 @@ module PropelAuth
59
66
  end
60
67
 
61
68
  def copy_jwt_controllers
62
- if api_versioned?
63
- template "auth/base_tokens_controller.rb.tt", "app/controllers/api/auth/base_tokens_controller.rb"
64
- template "auth/base_passwords_controller.rb.tt", "app/controllers/api/auth/base_passwords_controller.rb"
65
- create_versioned_controller(api_version, 'tokens', controller_directory)
66
- create_versioned_controller(api_version, 'passwords', controller_directory)
69
+ if auth_namespaced?
70
+ template "auth/base_tokens_controller.rb.tt", "app/controllers/#{auth_namespace_path}/auth/base_tokens_controller.rb"
71
+ template "auth/base_passwords_controller.rb.tt", "app/controllers/#{auth_namespace_path}/auth/base_passwords_controller.rb"
72
+ create_versioned_controller(@auth_version || 'v1', 'tokens', controller_directory)
73
+ create_versioned_controller(@auth_version || 'v1', 'passwords', controller_directory)
67
74
  else
68
75
  template "tokens_controller.rb.tt", "#{controller_directory}/tokens_controller.rb"
69
76
  template "auth/passwords_controller.rb.tt", "#{controller_directory}/passwords_controller.rb"
@@ -143,9 +150,10 @@ module PropelAuth
143
150
  invoke PropelAuth::UnpackGenerator, [], { force: false }
144
151
 
145
152
  say ""
146
- say "✅ Generator logic extracted to lib/generators/propel_auth/", :green
147
- say "💡 Your application is now completely standalone - no gem dependency needed for generators!", :cyan
148
- say "🗑️ You can now remove 'propel_auth' from your Gemfile", :yellow
153
+ say "✅ Generator logic extracted to lib/generators/propel_auth/", :green
154
+ say "💡 Your application is now completely standalone - no gem dependency needed!", :cyan
155
+ say "🗑️ You can now remove 'propel_auth' from your Gemfile", :yellow
156
+ say "📦 All PropelAuth runtime code is now in config/initializers/propel_auth.rb", :blue
149
157
  end
150
158
  end
151
159
 
@@ -158,11 +166,11 @@ module PropelAuth
158
166
  say "• Run: rails test", :blue
159
167
  say "• Optional: Remove 'propel_auth' from Gemfile (system is fully extracted)", :cyan
160
168
 
161
- if api_versioned?
162
- say "• Routes: /#{api_namespace}/auth/*", :blue
169
+ if auth_namespaced?
170
+ say "• Routes: #{auth_route_prefix}/*", :blue
163
171
  say "• Controllers: #{controller_namespace}::*", :blue
164
172
  else
165
- say "• Routes: /auth/*", :blue
173
+ say "• Routes: /login, /logout, /me", :blue
166
174
  say "• Controllers: Auth::*", :blue
167
175
  end
168
176
 
@@ -176,37 +184,25 @@ module PropelAuth
176
184
 
177
185
  private
178
186
 
179
- # Helper methods for API versioning
180
- def api_versioned?
181
- options[:api_version].present?
182
- end
183
-
184
- def api_version
185
- options[:api_version] || 'v1'
187
+ # Helper methods for authentication URL structure
188
+ def auth_namespaced?
189
+ @auth_namespace.present? || @auth_version.present?
186
190
  end
187
191
 
188
- def api_namespace
189
- "api/#{api_version}"
190
- end
191
-
192
- def api_namespace_parts
193
- api_namespace.split('/')
192
+ def auth_namespace_path
193
+ return '' unless auth_namespaced?
194
+ path_parts = []
195
+ path_parts << @auth_namespace if @auth_namespace.present?
196
+ path_parts << @auth_version if @auth_version.present?
197
+ path_parts.join('/')
194
198
  end
195
199
 
196
200
  def controller_namespace
197
- if api_versioned?
198
- api_namespace_parts.map(&:camelize).join('::') + '::Auth'
199
- else
200
- 'Auth'
201
- end
201
+ auth_controller_namespace
202
202
  end
203
203
 
204
204
  def controller_directory
205
- if api_versioned?
206
- "app/controllers/#{api_namespace}/auth"
207
- else
208
- "app/controllers/auth"
209
- end
205
+ auth_controller_directory
210
206
  end
211
207
 
212
208
  def api_only_app?
@@ -216,42 +212,42 @@ module PropelAuth
216
212
 
217
213
  # Path helper methods for tests
218
214
  def login_path_helper
219
- if api_versioned?
220
- "'/#{api_namespace}/auth/login'"
215
+ if auth_namespaced?
216
+ "'#{auth_route_prefix}/login'"
221
217
  else
222
- "'/auth/login'"
218
+ "'/login'"
223
219
  end
224
220
  end
225
221
 
226
222
  def me_path_helper
227
- if api_versioned?
228
- "'/#{api_namespace}/auth/me'"
223
+ if auth_namespaced?
224
+ "'#{auth_route_prefix}/me'"
229
225
  else
230
- "'/auth/me'"
226
+ "'/me'"
231
227
  end
232
228
  end
233
229
 
234
230
  def logout_path_helper
235
- if api_versioned?
236
- "'/#{api_namespace}/auth/logout'"
231
+ if auth_namespaced?
232
+ "'#{auth_route_prefix}/logout'"
237
233
  else
238
- "'/auth/logout'"
234
+ "'/logout'"
239
235
  end
240
236
  end
241
237
 
242
238
  def unlock_path_helper
243
- if api_versioned?
244
- "'/#{api_namespace}/auth/unlock'"
239
+ if auth_namespaced?
240
+ "'#{auth_route_prefix}/unlock'"
245
241
  else
246
- "'/auth/unlock'"
242
+ "'/unlock'"
247
243
  end
248
244
  end
249
245
 
250
246
  def password_reset_path_helper
251
- if api_versioned?
252
- "'/#{api_namespace}/auth/reset'"
247
+ if auth_namespaced?
248
+ "'#{auth_route_prefix}/reset'"
253
249
  else
254
- "'/auth/reset'"
250
+ "'/reset'"
255
251
  end
256
252
  end
257
253
 
@@ -290,30 +286,32 @@ module PropelAuth
290
286
  end
291
287
 
292
288
  def generate_routes_content
293
- if api_versioned?
294
- route_lines = ["# JWT Authentication routes for #{api_namespace}"]
289
+ if auth_namespaced?
290
+ route_lines = ["# JWT Authentication routes for #{auth_route_prefix}"]
295
291
 
296
- # Build nested namespace opening
297
- api_namespace_parts.each_with_index do |part, index|
292
+ # Build namespace opening
293
+ namespace_parts = []
294
+ namespace_parts << @auth_namespace if @auth_namespace.present?
295
+ namespace_parts << @auth_version if @auth_version.present?
296
+
297
+ namespace_parts.each_with_index do |part, index|
298
298
  indent = " " * index
299
299
  route_lines << "#{indent}namespace :#{part} do"
300
300
  end
301
301
 
302
- # Add auth namespace and routes
303
- auth_indent = " " * api_namespace_parts.length
304
- route_lines << "#{auth_indent}namespace :auth do"
305
- route_lines << "#{auth_indent} post 'login', to: 'tokens#create'"
306
- route_lines << "#{auth_indent} get 'me', to: 'tokens#me'"
307
- route_lines << "#{auth_indent} delete 'logout', to: 'tokens#destroy'"
308
- route_lines << "#{auth_indent} post 'unlock', to: 'tokens#unlock'"
309
- route_lines << "#{auth_indent} post 'reset', to: 'passwords#create'"
310
- route_lines << "#{auth_indent} get 'reset', to: 'passwords#show'"
311
- route_lines << "#{auth_indent} patch 'reset', to: 'passwords#update'"
312
- route_lines << "#{auth_indent}end"
302
+ # Add authentication routes directly in namespace (no nested /auth/)
303
+ route_indent = " " * namespace_parts.length
304
+ route_lines << "#{route_indent}post 'login', to: 'auth/tokens#create'"
305
+ route_lines << "#{route_indent}get 'me', to: 'auth/tokens#me'"
306
+ route_lines << "#{route_indent}delete 'logout', to: 'auth/tokens#destroy'"
307
+ route_lines << "#{route_indent}post 'unlock', to: 'auth/tokens#unlock'"
308
+ route_lines << "#{route_indent}post 'reset', to: 'auth/passwords#create'"
309
+ route_lines << "#{route_indent}get 'reset', to: 'auth/passwords#show'"
310
+ route_lines << "#{route_indent}patch 'reset', to: 'auth/passwords#update'"
313
311
 
314
- # Build nested namespace closing
315
- api_namespace_parts.length.times do |index|
316
- indent = " " * (api_namespace_parts.length - 1 - index)
312
+ # Build namespace closing
313
+ namespace_parts.length.times do |index|
314
+ indent = " " * (namespace_parts.length - 1 - index)
317
315
  route_lines << "#{indent}end"
318
316
  end
319
317
 
@@ -321,15 +319,13 @@ module PropelAuth
321
319
  else
322
320
  <<~ROUTES
323
321
  # JWT Authentication routes
324
- namespace :auth do
325
- post 'login', to: 'tokens#create'
326
- get 'me', to: 'tokens#me'
327
- delete 'logout', to: 'tokens#destroy'
328
- post 'unlock', to: 'tokens#unlock'
329
- post 'reset', to: 'passwords#create'
330
- get 'reset', to: 'passwords#show'
331
- patch 'reset', to: 'passwords#update'
332
- end
322
+ post 'login', to: 'auth/tokens#create'
323
+ get 'me', to: 'auth/tokens#me'
324
+ delete 'logout', to: 'auth/tokens#destroy'
325
+ post 'unlock', to: 'auth/tokens#unlock'
326
+ post 'reset', to: 'auth/passwords#create'
327
+ get 'reset', to: 'auth/passwords#show'
328
+ patch 'reset', to: 'auth/passwords#update'
333
329
  ROUTES
334
330
  end
335
331
  end
@@ -1,8 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # PropelAuth Configuration
3
+ # PropelAuth Runtime and Configuration
4
4
  # This file was generated by: rails generate propel_auth:install
5
5
  #
6
+ # This contains ALL PropelAuth runtime functionality - no gem dependency required!
6
7
  # This module provides JWT-based authentication for Rails applications
7
8
  # with features like account lockout, password reset, and email confirmation.
8
9
 
@@ -43,7 +44,8 @@ module PropelAuth
43
44
  :support_email,
44
45
  :enable_email_notifications,
45
46
  :enable_sms_notifications,
46
- :api_version
47
+ :namespace,
48
+ :version
47
49
 
48
50
  def initialize
49
51
  # JWT Configuration defaults
@@ -81,8 +83,9 @@ module PropelAuth
81
83
  @enable_email_notifications = true
82
84
  @enable_sms_notifications = false # Requires SMS provider configuration
83
85
 
84
- # API versioning configuration
85
- @api_version = 'v1' # Default API version
86
+ # API namespace and versioning configuration
87
+ @namespace = nil # Default to no namespace for clean URLs like /login
88
+ @version = nil # Default to no version for clean URLs like /login
86
89
  end
87
90
  end
88
91
 
@@ -126,7 +129,13 @@ PropelAuth.configure do |config|
126
129
  # Production-specific settings - shorter token expiration for security
127
130
  config.jwt_expiration = 2.hours
128
131
  end
132
+
133
+ # URL structure configuration (set by generator)
134
+ config.namespace = <%= @auth_namespace ? "'#{@auth_namespace}'" : 'nil' %>
135
+ config.version = <%= @auth_version ? "'#{@auth_version}'" : 'nil' %>
129
136
  end
130
137
 
131
- # Note: Generator files are loaded from gem unless unpacked
132
- # To customize generators, run: rails generate propel_auth:unpack
138
+ # PropelAuth is now fully extracted to your application!
139
+ # - All runtime code is in this file
140
+ # - Generator logic can be extracted with: rails generate propel_auth:unpack
141
+ # - You can remove 'propel_auth' from your Gemfile after installation
data/lib/propel_auth.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module PropelAuth
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: propel_authentication
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Propel Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-07-15 00:00:00.000000000 Z
11
+ date: 2025-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -70,6 +70,7 @@ files:
70
70
  - LICENSE
71
71
  - README.md
72
72
  - Rakefile
73
+ - lib/generators/propel_auth/core/configuration_methods.rb
73
74
  - lib/generators/propel_auth/install_generator.rb
74
75
  - lib/generators/propel_auth/pack_generator.rb
75
76
  - lib/generators/propel_auth/templates/agency.rb
@@ -92,9 +93,8 @@ files:
92
93
  - lib/generators/propel_auth/templates/db/migrate/create_users.rb
93
94
  - lib/generators/propel_auth/templates/db/seeds.rb
94
95
  - lib/generators/propel_auth/templates/invitation.rb
95
- - lib/generators/propel_auth/templates/lib/propel_auth.rb
96
96
  - lib/generators/propel_auth/templates/organization.rb
97
- - lib/generators/propel_auth/templates/propel_auth.rb
97
+ - lib/generators/propel_auth/templates/propel_auth.rb.tt
98
98
  - lib/generators/propel_auth/templates/services/auth_notification_service.rb
99
99
  - lib/generators/propel_auth/templates/test/concerns/confirmable_test.rb.tt
100
100
  - lib/generators/propel_auth/templates/test/concerns/lockable_test.rb.tt
@@ -118,7 +118,6 @@ files:
118
118
  - lib/generators/propel_auth/templates/views/auth_mailer/user_invitation.text.erb
119
119
  - lib/generators/propel_auth/test/dummy/Dockerfile
120
120
  - lib/generators/propel_auth/test/dummy/Gemfile
121
- - lib/generators/propel_auth/test/dummy/Gemfile.lock
122
121
  - lib/generators/propel_auth/test/dummy/README.md
123
122
  - lib/generators/propel_auth/test/dummy/Rakefile
124
123
  - lib/generators/propel_auth/test/dummy/app/assets/stylesheets/application.css
@@ -1,84 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module PropelAuth
4
- # PropelAuth configuration and error classes
5
- # This file was generated by PropelAuth and contains runtime functionality
6
- # that was extracted from the gem to your application for customization.
7
-
8
- class Error < StandardError; end
9
-
10
- class << self
11
- def configuration
12
- @configuration ||= Configuration.new
13
- end
14
-
15
- def configure
16
- yield(configuration)
17
- end
18
-
19
- def reset_configuration!
20
- @configuration = nil
21
- end
22
- end
23
-
24
- class Configuration
25
- attr_accessor :jwt_secret,
26
- :jwt_expiration,
27
- :jwt_algorithm,
28
- :password_length,
29
- :allow_registration,
30
- :require_email_confirmation,
31
- :confirmation_period,
32
- :confirmation_resend_interval,
33
- :max_failed_attempts,
34
- :lockout_duration,
35
- :password_reset_expiration,
36
- :password_reset_rate_limit,
37
- :frontend_url,
38
- :email_from_address,
39
- :support_email,
40
- :enable_email_notifications,
41
- :enable_sms_notifications,
42
- :api_version
43
-
44
- def initialize
45
- # JWT Configuration defaults
46
- @jwt_secret = nil # Will be set in initializer
47
- @jwt_expiration = 24.hours
48
- @jwt_algorithm = 'HS256'
49
-
50
- # Password requirements
51
- @password_length = 8..128
52
-
53
- # User registration settings
54
- @allow_registration = true
55
-
56
- # Email confirmation settings
57
- @require_email_confirmation = false
58
- @confirmation_period = 24.hours # How long confirmation tokens are valid
59
- @confirmation_resend_interval = 1.minute # Minimum time between resend attempts
60
-
61
- # Account lockout settings
62
- @max_failed_attempts = 10
63
- @lockout_duration = 30.minutes
64
-
65
- # Password reset settings
66
- @password_reset_expiration = 15.minutes
67
- @password_reset_rate_limit = 1.minute
68
-
69
- # Frontend URL for email links (configure for your frontend application)
70
- @frontend_url = Rails.env.development? ? 'http://localhost:3000' : nil
71
-
72
- # Email configuration
73
- @email_from_address = "noreply@#{Rails.application.class.module_parent.name.downcase}.com"
74
- @support_email = "support@#{Rails.application.class.module_parent.name.downcase}.com"
75
-
76
- # Notification preferences
77
- @enable_email_notifications = true
78
- @enable_sms_notifications = false # Requires SMS provider configuration
79
-
80
- # API versioning configuration
81
- @api_version = 'v1' # Default API version
82
- end
83
- end
84
- end
@@ -1,394 +0,0 @@
1
- PATH
2
- remote: ../..
3
- specs:
4
- propel_access (0.1.0)
5
- rails (>= 7.0)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- actioncable (8.0.2)
11
- actionpack (= 8.0.2)
12
- activesupport (= 8.0.2)
13
- nio4r (~> 2.0)
14
- websocket-driver (>= 0.6.1)
15
- zeitwerk (~> 2.6)
16
- actionmailbox (8.0.2)
17
- actionpack (= 8.0.2)
18
- activejob (= 8.0.2)
19
- activerecord (= 8.0.2)
20
- activestorage (= 8.0.2)
21
- activesupport (= 8.0.2)
22
- mail (>= 2.8.0)
23
- actionmailer (8.0.2)
24
- actionpack (= 8.0.2)
25
- actionview (= 8.0.2)
26
- activejob (= 8.0.2)
27
- activesupport (= 8.0.2)
28
- mail (>= 2.8.0)
29
- rails-dom-testing (~> 2.2)
30
- actionpack (8.0.2)
31
- actionview (= 8.0.2)
32
- activesupport (= 8.0.2)
33
- nokogiri (>= 1.8.5)
34
- rack (>= 2.2.4)
35
- rack-session (>= 1.0.1)
36
- rack-test (>= 0.6.3)
37
- rails-dom-testing (~> 2.2)
38
- rails-html-sanitizer (~> 1.6)
39
- useragent (~> 0.16)
40
- actiontext (8.0.2)
41
- actionpack (= 8.0.2)
42
- activerecord (= 8.0.2)
43
- activestorage (= 8.0.2)
44
- activesupport (= 8.0.2)
45
- globalid (>= 0.6.0)
46
- nokogiri (>= 1.8.5)
47
- actionview (8.0.2)
48
- activesupport (= 8.0.2)
49
- builder (~> 3.1)
50
- erubi (~> 1.11)
51
- rails-dom-testing (~> 2.2)
52
- rails-html-sanitizer (~> 1.6)
53
- activejob (8.0.2)
54
- activesupport (= 8.0.2)
55
- globalid (>= 0.3.6)
56
- activemodel (8.0.2)
57
- activesupport (= 8.0.2)
58
- activerecord (8.0.2)
59
- activemodel (= 8.0.2)
60
- activesupport (= 8.0.2)
61
- timeout (>= 0.4.0)
62
- activestorage (8.0.2)
63
- actionpack (= 8.0.2)
64
- activejob (= 8.0.2)
65
- activerecord (= 8.0.2)
66
- activesupport (= 8.0.2)
67
- marcel (~> 1.0)
68
- activesupport (8.0.2)
69
- base64
70
- benchmark (>= 0.3)
71
- bigdecimal
72
- concurrent-ruby (~> 1.0, >= 1.3.1)
73
- connection_pool (>= 2.2.5)
74
- drb
75
- i18n (>= 1.6, < 2)
76
- logger (>= 1.4.2)
77
- minitest (>= 5.1)
78
- securerandom (>= 0.3)
79
- tzinfo (~> 2.0, >= 2.0.5)
80
- uri (>= 0.13.1)
81
- addressable (2.8.7)
82
- public_suffix (>= 2.0.2, < 7.0)
83
- ast (2.4.3)
84
- base64 (0.3.0)
85
- bcrypt (3.1.20)
86
- bcrypt_pbkdf (1.1.1)
87
- bcrypt_pbkdf (1.1.1-arm64-darwin)
88
- bcrypt_pbkdf (1.1.1-x86_64-darwin)
89
- benchmark (0.4.1)
90
- bigdecimal (3.2.2)
91
- bindex (0.8.1)
92
- bootsnap (1.18.6)
93
- msgpack (~> 1.2)
94
- brakeman (7.0.2)
95
- racc
96
- builder (3.3.0)
97
- childprocess (5.1.0)
98
- logger (~> 1.5)
99
- concurrent-ruby (1.3.5)
100
- connection_pool (2.5.3)
101
- crass (1.0.6)
102
- date (3.4.1)
103
- debug (1.11.0)
104
- irb (~> 1.10)
105
- reline (>= 0.3.8)
106
- dotenv (3.1.8)
107
- drb (2.2.3)
108
- ed25519 (1.4.0)
109
- erubi (1.13.1)
110
- et-orbi (1.2.11)
111
- tzinfo
112
- fugit (1.11.1)
113
- et-orbi (~> 1, >= 1.2.11)
114
- raabro (~> 1.4)
115
- globalid (1.2.1)
116
- activesupport (>= 6.1)
117
- i18n (1.14.7)
118
- concurrent-ruby (~> 1.0)
119
- importmap-rails (2.1.0)
120
- actionpack (>= 6.0.0)
121
- activesupport (>= 6.0.0)
122
- railties (>= 6.0.0)
123
- io-console (0.8.0)
124
- irb (1.15.2)
125
- pp (>= 0.6.0)
126
- rdoc (>= 4.0.0)
127
- reline (>= 0.4.2)
128
- jbuilder (2.13.0)
129
- actionview (>= 5.0.0)
130
- activesupport (>= 5.0.0)
131
- json (2.12.2)
132
- jwt (2.10.2)
133
- base64
134
- kamal (2.7.0)
135
- activesupport (>= 7.0)
136
- base64 (~> 0.2)
137
- bcrypt_pbkdf (~> 1.0)
138
- concurrent-ruby (~> 1.2)
139
- dotenv (~> 3.1)
140
- ed25519 (~> 1.4)
141
- net-ssh (~> 7.3)
142
- sshkit (>= 1.23.0, < 2.0)
143
- thor (~> 1.3)
144
- zeitwerk (>= 2.6.18, < 3.0)
145
- language_server-protocol (3.17.0.5)
146
- launchy (3.1.1)
147
- addressable (~> 2.8)
148
- childprocess (~> 5.0)
149
- logger (~> 1.6)
150
- letter_opener (1.10.0)
151
- launchy (>= 2.2, < 4)
152
- lint_roller (1.1.0)
153
- logger (1.7.0)
154
- loofah (2.24.1)
155
- crass (~> 1.0.2)
156
- nokogiri (>= 1.12.0)
157
- mail (2.8.1)
158
- mini_mime (>= 0.1.1)
159
- net-imap
160
- net-pop
161
- net-smtp
162
- marcel (1.0.4)
163
- mini_mime (1.1.5)
164
- minitest (5.25.5)
165
- msgpack (1.8.0)
166
- net-imap (0.5.9)
167
- date
168
- net-protocol
169
- net-pop (0.1.2)
170
- net-protocol
171
- net-protocol (0.2.2)
172
- timeout
173
- net-scp (4.1.0)
174
- net-ssh (>= 2.6.5, < 8.0.0)
175
- net-sftp (4.0.0)
176
- net-ssh (>= 5.0.0, < 8.0.0)
177
- net-smtp (0.5.1)
178
- net-protocol
179
- net-ssh (7.3.0)
180
- nio4r (2.7.4)
181
- nokogiri (1.18.8-aarch64-linux-gnu)
182
- racc (~> 1.4)
183
- nokogiri (1.18.8-aarch64-linux-musl)
184
- racc (~> 1.4)
185
- nokogiri (1.18.8-arm-linux-gnu)
186
- racc (~> 1.4)
187
- nokogiri (1.18.8-arm-linux-musl)
188
- racc (~> 1.4)
189
- nokogiri (1.18.8-arm64-darwin)
190
- racc (~> 1.4)
191
- nokogiri (1.18.8-x86_64-darwin)
192
- racc (~> 1.4)
193
- nokogiri (1.18.8-x86_64-linux-gnu)
194
- racc (~> 1.4)
195
- nokogiri (1.18.8-x86_64-linux-musl)
196
- racc (~> 1.4)
197
- ostruct (0.6.2)
198
- parallel (1.27.0)
199
- parser (3.3.8.0)
200
- ast (~> 2.4.1)
201
- racc
202
- pp (0.6.2)
203
- prettyprint
204
- prettyprint (0.2.0)
205
- prism (1.4.0)
206
- propshaft (1.1.0)
207
- actionpack (>= 7.0.0)
208
- activesupport (>= 7.0.0)
209
- rack
210
- railties (>= 7.0.0)
211
- psych (5.2.6)
212
- date
213
- stringio
214
- public_suffix (6.0.2)
215
- puma (6.6.0)
216
- nio4r (~> 2.0)
217
- raabro (1.4.0)
218
- racc (1.8.1)
219
- rack (3.1.16)
220
- rack-session (2.1.1)
221
- base64 (>= 0.1.0)
222
- rack (>= 3.0.0)
223
- rack-test (2.2.0)
224
- rack (>= 1.3)
225
- rackup (2.2.1)
226
- rack (>= 3)
227
- rails (8.0.2)
228
- actioncable (= 8.0.2)
229
- actionmailbox (= 8.0.2)
230
- actionmailer (= 8.0.2)
231
- actionpack (= 8.0.2)
232
- actiontext (= 8.0.2)
233
- actionview (= 8.0.2)
234
- activejob (= 8.0.2)
235
- activemodel (= 8.0.2)
236
- activerecord (= 8.0.2)
237
- activestorage (= 8.0.2)
238
- activesupport (= 8.0.2)
239
- bundler (>= 1.15.0)
240
- railties (= 8.0.2)
241
- rails-dom-testing (2.3.0)
242
- activesupport (>= 5.0.0)
243
- minitest
244
- nokogiri (>= 1.6)
245
- rails-html-sanitizer (1.6.2)
246
- loofah (~> 2.21)
247
- 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)
248
- railties (8.0.2)
249
- actionpack (= 8.0.2)
250
- activesupport (= 8.0.2)
251
- irb (~> 1.13)
252
- rackup (>= 1.0.0)
253
- rake (>= 12.2)
254
- thor (~> 1.0, >= 1.2.2)
255
- zeitwerk (~> 2.6)
256
- rainbow (3.1.1)
257
- rake (13.3.0)
258
- rdoc (6.13.0)
259
- psych (>= 4.0.0)
260
- regexp_parser (2.10.0)
261
- reline (0.6.1)
262
- io-console (~> 0.5)
263
- rubocop (1.77.0)
264
- json (~> 2.3)
265
- language_server-protocol (~> 3.17.0.2)
266
- lint_roller (~> 1.1.0)
267
- parallel (~> 1.10)
268
- parser (>= 3.3.0.2)
269
- rainbow (>= 2.2.2, < 4.0)
270
- regexp_parser (>= 2.9.3, < 3.0)
271
- rubocop-ast (>= 1.45.1, < 2.0)
272
- ruby-progressbar (~> 1.7)
273
- unicode-display_width (>= 2.4.0, < 4.0)
274
- rubocop-ast (1.45.1)
275
- parser (>= 3.3.7.2)
276
- prism (~> 1.4)
277
- rubocop-performance (1.25.0)
278
- lint_roller (~> 1.1)
279
- rubocop (>= 1.75.0, < 2.0)
280
- rubocop-ast (>= 1.38.0, < 2.0)
281
- rubocop-rails (2.32.0)
282
- activesupport (>= 4.2.0)
283
- lint_roller (~> 1.1)
284
- rack (>= 1.1)
285
- rubocop (>= 1.75.0, < 2.0)
286
- rubocop-ast (>= 1.44.0, < 2.0)
287
- rubocop-rails-omakase (1.1.0)
288
- rubocop (>= 1.72)
289
- rubocop-performance (>= 1.24)
290
- rubocop-rails (>= 2.30)
291
- ruby-progressbar (1.13.0)
292
- securerandom (0.4.1)
293
- solid_cable (3.0.11)
294
- actioncable (>= 7.2)
295
- activejob (>= 7.2)
296
- activerecord (>= 7.2)
297
- railties (>= 7.2)
298
- solid_cache (1.0.7)
299
- activejob (>= 7.2)
300
- activerecord (>= 7.2)
301
- railties (>= 7.2)
302
- solid_queue (1.1.5)
303
- activejob (>= 7.1)
304
- activerecord (>= 7.1)
305
- concurrent-ruby (>= 1.3.1)
306
- fugit (~> 1.11.0)
307
- railties (>= 7.1)
308
- thor (~> 1.3.1)
309
- sqlite3 (2.7.0-aarch64-linux-gnu)
310
- sqlite3 (2.7.0-aarch64-linux-musl)
311
- sqlite3 (2.7.0-arm-linux-gnu)
312
- sqlite3 (2.7.0-arm-linux-musl)
313
- sqlite3 (2.7.0-arm64-darwin)
314
- sqlite3 (2.7.0-x86_64-darwin)
315
- sqlite3 (2.7.0-x86_64-linux-gnu)
316
- sqlite3 (2.7.0-x86_64-linux-musl)
317
- sshkit (1.24.0)
318
- base64
319
- logger
320
- net-scp (>= 1.1.2)
321
- net-sftp (>= 2.1.2)
322
- net-ssh (>= 2.8.0)
323
- ostruct
324
- stimulus-rails (1.3.4)
325
- railties (>= 6.0.0)
326
- stringio (3.1.7)
327
- thor (1.3.2)
328
- thruster (0.1.14)
329
- thruster (0.1.14-aarch64-linux)
330
- thruster (0.1.14-arm64-darwin)
331
- thruster (0.1.14-x86_64-darwin)
332
- thruster (0.1.14-x86_64-linux)
333
- timeout (0.4.3)
334
- turbo-rails (2.0.16)
335
- actionpack (>= 7.1.0)
336
- railties (>= 7.1.0)
337
- tzinfo (2.0.6)
338
- concurrent-ruby (~> 1.0)
339
- unicode-display_width (3.1.4)
340
- unicode-emoji (~> 4.0, >= 4.0.4)
341
- unicode-emoji (4.0.4)
342
- uri (1.0.3)
343
- useragent (0.16.11)
344
- web-console (4.2.1)
345
- actionview (>= 6.0.0)
346
- activemodel (>= 6.0.0)
347
- bindex (>= 0.4.0)
348
- railties (>= 6.0.0)
349
- websocket-driver (0.8.0)
350
- base64
351
- websocket-extensions (>= 0.1.0)
352
- websocket-extensions (0.1.5)
353
- zeitwerk (2.7.3)
354
-
355
- PLATFORMS
356
- aarch64-linux
357
- aarch64-linux-gnu
358
- aarch64-linux-musl
359
- arm-linux-gnu
360
- arm-linux-musl
361
- arm64-darwin
362
- x86_64-darwin
363
- x86_64-linux
364
- x86_64-linux-gnu
365
- x86_64-linux-musl
366
-
367
- DEPENDENCIES
368
- bcrypt (~> 3.1.20)
369
- bootsnap
370
- brakeman
371
- debug
372
- importmap-rails
373
- jbuilder
374
- jwt (~> 2.7)
375
- kamal
376
- letter_opener (~> 1.8)
377
- propel_access!
378
- propshaft
379
- puma (>= 5.0)
380
- rails (~> 8.0.2)
381
- rdoc (= 6.13.0)
382
- rubocop-rails-omakase
383
- solid_cable
384
- solid_cache
385
- solid_queue
386
- sqlite3 (>= 2.1)
387
- stimulus-rails
388
- thruster
389
- turbo-rails
390
- tzinfo-data
391
- web-console
392
-
393
- BUNDLED WITH
394
- 2.6.8