Class: Booth::Configuration
- Inherits:
-
Object
- Object
- Booth::Configuration
- Defined in:
- lib/booth/configuration.rb
Overview
Holds global configuration parameters.
Instance Attribute Summary collapse
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#relying_party_resolver ⇒ Object
Returns the value of attribute relying_party_resolver.
-
#session_inactivity_lifetime ⇒ Object
Returns the value of attribute session_inactivity_lifetime.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #interaction_timeout ⇒ Object
- #log_to_rails_and_stdout! ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
6 7 8 9 10 11 12 13 14 |
# File 'lib/booth/configuration.rb', line 6 def initialize @logger = rails_logger @session_inactivity_lifetime = 1.year # Need to keep the name `request:` here, because it is checked when calling the lambda. = lambda { |request:| # rubocop:disable Lint/UnusedBlockArgument raise 'Please set a Booth.config.relying_party_resolver' } end |
Instance Attribute Details
#logger ⇒ Object
Returns the value of attribute logger.
16 17 18 |
# File 'lib/booth/configuration.rb', line 16 def logger @logger end |
#relying_party_resolver ⇒ Object
Returns the value of attribute relying_party_resolver.
16 17 18 |
# File 'lib/booth/configuration.rb', line 16 def end |
#session_inactivity_lifetime ⇒ Object
Returns the value of attribute session_inactivity_lifetime.
16 17 18 |
# File 'lib/booth/configuration.rb', line 16 def session_inactivity_lifetime @session_inactivity_lifetime end |
Instance Method Details
#interaction_timeout ⇒ Object
18 19 20 |
# File 'lib/booth/configuration.rb', line 18 def interaction_timeout 20.minutes end |
#log_to_rails_and_stdout! ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/booth/configuration.rb', line 22 def log_to_rails_and_stdout! self.logger = Class.new do def debug(...) ::Booth.config.send(:rails_logger).debug(...) ::Booth.config.send(:stdout_logger).debug(...) end end.new end |