Class: ApiKeys::Configuration
- Inherits:
-
Object
- Object
- ApiKeys::Configuration
- Defined in:
- lib/api_keys/configuration.rb
Overview
Defines the configuration options for the ApiKeys gem. These options can be set in an initializer, e.g., config/initializers/api_keys.rb
Constant Summary collapse
- DEFAULT_CALLBACK =
Default empty callback proc
->(_context){}.freeze
Instance Attribute Summary collapse
-
#after_authentication ⇒ Object
Callbacks (Placeholders for future extension).
-
#authenticate_owner_method ⇒ Object
Owner Context Configuration.
-
#before_authentication ⇒ Object
Callbacks (Placeholders for future extension).
-
#cache_ttl ⇒ Object
Performance.
-
#callbacks_job_queue ⇒ Object
Background Job Queues.
-
#current_owner_method ⇒ Object
Owner Context Configuration.
-
#debug_logging ⇒ Object
Debugging.
-
#default_max_keys_per_owner ⇒ Object
Optional Behaviors.
-
#default_scopes ⇒ Object
Returns the value of attribute default_scopes.
-
#enable_async_operations ⇒ Object
Global Async Toggle.
-
#expire_after ⇒ Object
Returns the value of attribute expire_after.
-
#hash_strategy ⇒ Object
Storage & Verification.
-
#header ⇒ Object
Core Authentication.
-
#https_only_production ⇒ Object
Security.
-
#https_strict_mode ⇒ Object
Security.
-
#key_store_adapter ⇒ Object
Storage & Verification.
-
#parent_controller ⇒ Object
Engine Configuration.
-
#policy_provider ⇒ Object
Storage & Verification.
-
#query_param ⇒ Object
Core Authentication.
-
#require_key_name ⇒ Object
Optional Behaviors.
-
#return_text ⇒ Object
Engine UI Configuration.
-
#return_url ⇒ Object
Engine UI Configuration.
-
#secure_compare_proc ⇒ Object
Storage & Verification.
-
#stats_job_queue ⇒ Object
Background Job Queues.
-
#tenant_resolver ⇒ Object
Tenant Resolution.
-
#token_alphabet ⇒ Object
Token Generation.
-
#token_length ⇒ Object
Token Generation.
-
#token_prefix ⇒ Object
Token Generation.
-
#track_requests_count ⇒ Object
Returns the value of attribute track_requests_count.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
Initialization ==.
Constructor Details
#initialize ⇒ Configuration
Initialization ==
60 61 62 |
# File 'lib/api_keys/configuration.rb', line 60 def initialize set_defaults end |
Instance Attribute Details
#after_authentication ⇒ Object
Callbacks (Placeholders for future extension)
44 45 46 |
# File 'lib/api_keys/configuration.rb', line 44 def after_authentication @after_authentication end |
#authenticate_owner_method ⇒ Object
Owner Context Configuration
28 29 30 |
# File 'lib/api_keys/configuration.rb', line 28 def authenticate_owner_method @authenticate_owner_method end |
#before_authentication ⇒ Object
Callbacks (Placeholders for future extension)
44 45 46 |
# File 'lib/api_keys/configuration.rb', line 44 def before_authentication @before_authentication end |
#cache_ttl ⇒ Object
Performance
35 36 37 |
# File 'lib/api_keys/configuration.rb', line 35 def cache_ttl @cache_ttl end |
#callbacks_job_queue ⇒ Object
Background Job Queues
47 48 49 |
# File 'lib/api_keys/configuration.rb', line 47 def callbacks_job_queue @callbacks_job_queue end |
#current_owner_method ⇒ Object
Owner Context Configuration
28 29 30 |
# File 'lib/api_keys/configuration.rb', line 28 def current_owner_method @current_owner_method end |
#debug_logging ⇒ Object
Debugging
56 57 58 |
# File 'lib/api_keys/configuration.rb', line 56 def debug_logging @debug_logging end |
#default_max_keys_per_owner ⇒ Object
Optional Behaviors
31 32 33 |
# File 'lib/api_keys/configuration.rb', line 31 def default_max_keys_per_owner @default_max_keys_per_owner end |
#default_scopes ⇒ Object
Returns the value of attribute default_scopes.
32 33 34 |
# File 'lib/api_keys/configuration.rb', line 32 def default_scopes @default_scopes end |
#enable_async_operations ⇒ Object
Global Async Toggle
50 51 52 |
# File 'lib/api_keys/configuration.rb', line 50 def enable_async_operations @enable_async_operations end |
#expire_after ⇒ Object
Returns the value of attribute expire_after.
32 33 34 |
# File 'lib/api_keys/configuration.rb', line 32 def expire_after @expire_after end |
#hash_strategy ⇒ Object
Storage & Verification
22 23 24 |
# File 'lib/api_keys/configuration.rb', line 22 def hash_strategy @hash_strategy end |
#header ⇒ Object
Core Authentication
16 17 18 |
# File 'lib/api_keys/configuration.rb', line 16 def header @header end |
#https_only_production ⇒ Object
Security
38 39 40 |
# File 'lib/api_keys/configuration.rb', line 38 def https_only_production @https_only_production end |
#https_strict_mode ⇒ Object
Security
38 39 40 |
# File 'lib/api_keys/configuration.rb', line 38 def https_strict_mode @https_strict_mode end |
#key_store_adapter ⇒ Object
Storage & Verification
22 23 24 |
# File 'lib/api_keys/configuration.rb', line 22 def key_store_adapter @key_store_adapter end |
#parent_controller ⇒ Object
Engine Configuration
25 26 27 |
# File 'lib/api_keys/configuration.rb', line 25 def parent_controller @parent_controller end |
#policy_provider ⇒ Object
Storage & Verification
22 23 24 |
# File 'lib/api_keys/configuration.rb', line 22 def policy_provider @policy_provider end |
#query_param ⇒ Object
Core Authentication
16 17 18 |
# File 'lib/api_keys/configuration.rb', line 16 def query_param @query_param end |
#require_key_name ⇒ Object
Optional Behaviors
31 32 33 |
# File 'lib/api_keys/configuration.rb', line 31 def require_key_name @require_key_name end |
#return_text ⇒ Object
Engine UI Configuration
53 54 55 |
# File 'lib/api_keys/configuration.rb', line 53 def return_text @return_text end |
#return_url ⇒ Object
Engine UI Configuration
53 54 55 |
# File 'lib/api_keys/configuration.rb', line 53 def return_url @return_url end |
#secure_compare_proc ⇒ Object
Storage & Verification
22 23 24 |
# File 'lib/api_keys/configuration.rb', line 22 def secure_compare_proc @secure_compare_proc end |
#stats_job_queue ⇒ Object
Background Job Queues
47 48 49 |
# File 'lib/api_keys/configuration.rb', line 47 def stats_job_queue @stats_job_queue end |
#tenant_resolver ⇒ Object
Tenant Resolution
41 42 43 |
# File 'lib/api_keys/configuration.rb', line 41 def tenant_resolver @tenant_resolver end |
#token_alphabet ⇒ Object
Token Generation
19 20 21 |
# File 'lib/api_keys/configuration.rb', line 19 def token_alphabet @token_alphabet end |
#token_length ⇒ Object
Token Generation
19 20 21 |
# File 'lib/api_keys/configuration.rb', line 19 def token_length @token_length end |
#token_prefix ⇒ Object
Token Generation
19 20 21 |
# File 'lib/api_keys/configuration.rb', line 19 def token_prefix @token_prefix end |
#track_requests_count ⇒ Object
Returns the value of attribute track_requests_count.
32 33 34 |
# File 'lib/api_keys/configuration.rb', line 32 def track_requests_count @track_requests_count end |