Class: Touth::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_lifetimeObject

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_raiseObject

Returns the value of attribute allow_raise.



18
19
20
# File 'lib/touth.rb', line 18

def allow_raise
  @allow_raise
end

#client_secret_keyObject

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_nameObject

Returns the value of attribute header_name.



18
19
20
# File 'lib/touth.rb', line 18

def header_name
  @header_name
end

#password_fieldObject

Returns the value of attribute password_field.



18
19
20
# File 'lib/touth.rb', line 18

def password_field
  @password_field
end