Class: AtprotoAuth::Configuration
- Inherits:
-
Object
- Object
- AtprotoAuth::Configuration
- Defined in:
- lib/atproto_auth/configuration.rb
Overview
Configuration class for global AtprotoAuth settings
Instance Attribute Summary collapse
-
#default_token_lifetime ⇒ Object
Returns the value of attribute default_token_lifetime.
-
#dpop_nonce_lifetime ⇒ Object
Returns the value of attribute dpop_nonce_lifetime.
-
#encryption ⇒ Object
Returns the value of attribute encryption.
-
#http_client ⇒ Object
Returns the value of attribute http_client.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#storage ⇒ Object
Returns the value of attribute storage.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
-
#validate! ⇒ Object
Validates the current configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
17 18 19 20 21 22 23 24 |
# File 'lib/atproto_auth/configuration.rb', line 17 def initialize @default_token_lifetime = 300 # 5 minutes in seconds @dpop_nonce_lifetime = 300 # 5 minutes in seconds @encryption = nil @http_client = nil @logger = Logger.new($stdout) @storage = AtprotoAuth::Storage::Memory.new end |
Instance Attribute Details
#default_token_lifetime ⇒ Object
Returns the value of attribute default_token_lifetime.
10 11 12 |
# File 'lib/atproto_auth/configuration.rb', line 10 def default_token_lifetime @default_token_lifetime end |
#dpop_nonce_lifetime ⇒ Object
Returns the value of attribute dpop_nonce_lifetime.
10 11 12 |
# File 'lib/atproto_auth/configuration.rb', line 10 def dpop_nonce_lifetime @dpop_nonce_lifetime end |
#encryption ⇒ Object
Returns the value of attribute encryption.
10 11 12 |
# File 'lib/atproto_auth/configuration.rb', line 10 def encryption @encryption end |
#http_client ⇒ Object
Returns the value of attribute http_client.
10 11 12 |
# File 'lib/atproto_auth/configuration.rb', line 10 def http_client @http_client end |
#logger ⇒ Object
Returns the value of attribute logger.
10 11 12 |
# File 'lib/atproto_auth/configuration.rb', line 10 def logger @logger end |
#storage ⇒ Object
Returns the value of attribute storage.
10 11 12 |
# File 'lib/atproto_auth/configuration.rb', line 10 def storage @storage end |
Instance Method Details
#validate! ⇒ Object
Validates the current configuration
28 29 30 31 32 |
# File 'lib/atproto_auth/configuration.rb', line 28 def validate! validate_storage! validate_http_client! true end |