Class: Tinytokenauth::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/tinytokenauth/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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

Returns the value of attribute cookie_name.



4
5
6
# File 'lib/tinytokenauth/configuration.rb', line 4

def cookie_name
  @cookie_name
end

#token_auto_renew_hoursObject

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_secretObject

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_hoursObject

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_classObject

Returns the value of attribute user_class.



4
5
6
# File 'lib/tinytokenauth/configuration.rb', line 4

def user_class
  @user_class
end