Class: Rack::Authenticate::Middleware::Configuration
- Inherits:
-
Object
- Object
- Rack::Authenticate::Middleware::Configuration
- Defined in:
- lib/rack/authenticate/middleware.rb
Instance Attribute Summary collapse
-
#basic_auth_validation_block ⇒ Object
readonly
Returns the value of attribute basic_auth_validation_block.
-
#timestamp_minute_tolerance ⇒ Object
Returns the value of attribute timestamp_minute_tolerance.
Instance Method Summary collapse
- #basic_auth_validation(&block) ⇒ Object
- #hmac_secret_key(&block) ⇒ Object
- #hmac_secret_key_for(access_id) ⇒ Object
-
#initialize(*args) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(*args) ⇒ Configuration
Returns a new instance of Configuration.
9 10 11 12 13 |
# File 'lib/rack/authenticate/middleware.rb', line 9 def initialize(*args) self. ||= 30 self.hmac_secret_key { |access_id| } self.basic_auth_validation { |u, p| false } end |
Instance Attribute Details
#basic_auth_validation_block ⇒ Object (readonly)
Returns the value of attribute basic_auth_validation_block.
16 17 18 |
# File 'lib/rack/authenticate/middleware.rb', line 16 def basic_auth_validation_block @basic_auth_validation_block end |
#timestamp_minute_tolerance ⇒ Object
Returns the value of attribute timestamp_minute_tolerance.
15 16 17 |
# File 'lib/rack/authenticate/middleware.rb', line 15 def @timestamp_minute_tolerance end |
Instance Method Details
#basic_auth_validation(&block) ⇒ Object
26 27 28 |
# File 'lib/rack/authenticate/middleware.rb', line 26 def basic_auth_validation(&block) @basic_auth_validation_block = block end |
#hmac_secret_key(&block) ⇒ Object
18 19 20 |
# File 'lib/rack/authenticate/middleware.rb', line 18 def hmac_secret_key(&block) @hmac_secret_key_block = block end |
#hmac_secret_key_for(access_id) ⇒ Object
22 23 24 |
# File 'lib/rack/authenticate/middleware.rb', line 22 def hmac_secret_key_for(access_id) @hmac_secret_key_block[access_id] end |