Class: Touth::Configuration
- Inherits:
-
Object
- Object
- Touth::Configuration
- Defined in:
- lib/touth.rb
Instance Attribute Summary collapse
-
#access_token_lifetime ⇒ Object
Returns the value of attribute access_token_lifetime.
-
#allow_raise ⇒ Object
Returns the value of attribute allow_raise.
-
#client_secret_key ⇒ Object
Returns the value of attribute client_secret_key.
-
#header_name ⇒ Object
Returns the value of attribute header_name.
-
#password_field ⇒ Object
Returns the value of attribute password_field.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
24 25 26 27 28 29 30 |
# File 'lib/touth.rb', line 24 def initialize @access_token_lifetime = 60 * (24 * 60 * 60) # 60 days @client_secret_key = '' # use SecureRandom.hex(64) to generate one @password_field = :encrypted_password @header_name = 'X-Access-Token' @allow_raise = false end |
Instance Attribute Details
#access_token_lifetime ⇒ Object
Returns the value of attribute access_token_lifetime.
18 19 20 |
# File 'lib/touth.rb', line 18 def access_token_lifetime @access_token_lifetime end |
#allow_raise ⇒ Object
Returns the value of attribute allow_raise.
18 19 20 |
# File 'lib/touth.rb', line 18 def allow_raise @allow_raise end |
#client_secret_key ⇒ Object
Returns the value of attribute client_secret_key.
18 19 20 |
# File 'lib/touth.rb', line 18 def client_secret_key @client_secret_key end |
#header_name ⇒ Object
Returns the value of attribute header_name.
18 19 20 |
# File 'lib/touth.rb', line 18 def header_name @header_name end |
#password_field ⇒ Object
Returns the value of attribute password_field.
18 19 20 |
# File 'lib/touth.rb', line 18 def password_field @password_field end |