Class: Tinytokenauth::Configuration
- Inherits:
-
Object
- Object
- Tinytokenauth::Configuration
- Defined in:
- lib/tinytokenauth/configuration.rb
Instance Attribute Summary collapse
-
#cookie_name ⇒ Object
Returns the value of attribute cookie_name.
-
#token_auto_renew_hours ⇒ Object
Returns the value of attribute token_auto_renew_hours.
-
#token_secret ⇒ Object
Returns the value of attribute token_secret.
-
#token_validity_hours ⇒ Object
Returns the value of attribute token_validity_hours.
-
#user_class ⇒ Object
Returns the value of attribute user_class.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
6 7 8 9 10 11 12 |
# File 'lib/tinytokenauth/configuration.rb', line 6 def initialize @user_class = 'User' @token_validity_hours = 24 @token_auto_renew_hours = 4 @token_secret = Rails.application.credentials.secret_key_base @cookie_name = 'ttauth' end |
Instance Attribute Details
#cookie_name ⇒ Object
Returns the value of attribute cookie_name.
4 5 6 |
# File 'lib/tinytokenauth/configuration.rb', line 4 def @cookie_name end |
#token_auto_renew_hours ⇒ Object
Returns the value of attribute token_auto_renew_hours.
4 5 6 |
# File 'lib/tinytokenauth/configuration.rb', line 4 def token_auto_renew_hours @token_auto_renew_hours end |
#token_secret ⇒ Object
Returns the value of attribute token_secret.
4 5 6 |
# File 'lib/tinytokenauth/configuration.rb', line 4 def token_secret @token_secret end |
#token_validity_hours ⇒ Object
Returns the value of attribute token_validity_hours.
4 5 6 |
# File 'lib/tinytokenauth/configuration.rb', line 4 def token_validity_hours @token_validity_hours end |
#user_class ⇒ Object
Returns the value of attribute user_class.
4 5 6 |
# File 'lib/tinytokenauth/configuration.rb', line 4 def user_class @user_class end |