Class: ApiKeys::Configuration

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Initialization ==



60
61
62
# File 'lib/api_keys/configuration.rb', line 60

def initialize
  set_defaults
end

Instance Attribute Details

#after_authenticationObject

Callbacks (Placeholders for future extension)



44
45
46
# File 'lib/api_keys/configuration.rb', line 44

def after_authentication
  @after_authentication
end

#authenticate_owner_methodObject

Owner Context Configuration



28
29
30
# File 'lib/api_keys/configuration.rb', line 28

def authenticate_owner_method
  @authenticate_owner_method
end

#before_authenticationObject

Callbacks (Placeholders for future extension)



44
45
46
# File 'lib/api_keys/configuration.rb', line 44

def before_authentication
  @before_authentication
end

#cache_ttlObject

Performance



35
36
37
# File 'lib/api_keys/configuration.rb', line 35

def cache_ttl
  @cache_ttl
end

#callbacks_job_queueObject

Background Job Queues



47
48
49
# File 'lib/api_keys/configuration.rb', line 47

def callbacks_job_queue
  @callbacks_job_queue
end

#current_owner_methodObject

Owner Context Configuration



28
29
30
# File 'lib/api_keys/configuration.rb', line 28

def current_owner_method
  @current_owner_method
end

#debug_loggingObject

Debugging



56
57
58
# File 'lib/api_keys/configuration.rb', line 56

def debug_logging
  @debug_logging
end

#default_max_keys_per_ownerObject

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_scopesObject

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_operationsObject

Global Async Toggle



50
51
52
# File 'lib/api_keys/configuration.rb', line 50

def enable_async_operations
  @enable_async_operations
end

#expire_afterObject

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_strategyObject

Storage & Verification



22
23
24
# File 'lib/api_keys/configuration.rb', line 22

def hash_strategy
  @hash_strategy
end

#headerObject

Core Authentication



16
17
18
# File 'lib/api_keys/configuration.rb', line 16

def header
  @header
end

#https_only_productionObject

Security



38
39
40
# File 'lib/api_keys/configuration.rb', line 38

def https_only_production
  @https_only_production
end

#https_strict_modeObject

Security



38
39
40
# File 'lib/api_keys/configuration.rb', line 38

def https_strict_mode
  @https_strict_mode
end

#key_store_adapterObject

Storage & Verification



22
23
24
# File 'lib/api_keys/configuration.rb', line 22

def key_store_adapter
  @key_store_adapter
end

#parent_controllerObject

Engine Configuration



25
26
27
# File 'lib/api_keys/configuration.rb', line 25

def parent_controller
  @parent_controller
end

#policy_providerObject

Storage & Verification



22
23
24
# File 'lib/api_keys/configuration.rb', line 22

def policy_provider
  @policy_provider
end

#query_paramObject

Core Authentication



16
17
18
# File 'lib/api_keys/configuration.rb', line 16

def query_param
  @query_param
end

#require_key_nameObject

Optional Behaviors



31
32
33
# File 'lib/api_keys/configuration.rb', line 31

def require_key_name
  @require_key_name
end

#return_textObject

Engine UI Configuration



53
54
55
# File 'lib/api_keys/configuration.rb', line 53

def return_text
  @return_text
end

#return_urlObject

Engine UI Configuration



53
54
55
# File 'lib/api_keys/configuration.rb', line 53

def return_url
  @return_url
end

#secure_compare_procObject

Storage & Verification



22
23
24
# File 'lib/api_keys/configuration.rb', line 22

def secure_compare_proc
  @secure_compare_proc
end

#stats_job_queueObject

Background Job Queues



47
48
49
# File 'lib/api_keys/configuration.rb', line 47

def stats_job_queue
  @stats_job_queue
end

#tenant_resolverObject

Tenant Resolution



41
42
43
# File 'lib/api_keys/configuration.rb', line 41

def tenant_resolver
  @tenant_resolver
end

#token_alphabetObject

Token Generation



19
20
21
# File 'lib/api_keys/configuration.rb', line 19

def token_alphabet
  @token_alphabet
end

#token_lengthObject

Token Generation



19
20
21
# File 'lib/api_keys/configuration.rb', line 19

def token_length
  @token_length
end

#token_prefixObject

Token Generation



19
20
21
# File 'lib/api_keys/configuration.rb', line 19

def token_prefix
  @token_prefix
end

#track_requests_countObject

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