Class: Zas::Authenticators::SequelPasswordAuthenticator::Configuration

Inherits:
Struct
  • Object
show all
Defined in:
lib/zas/authenticators/sequel_password_authenticator.rb

Overview

Public: Configuration for the authenticator

Configuration attributes include:

table_name - The table name to query to authenticate. Defaults to ‘users’ username_field - The name of the field used to store the user identifier, defaults to ‘username’ password_field - The name of the field used to store the encrypted password, ‘defaults to ’crypted_password’ salt_field - The name of the field used to store a salt, defaults to ‘password_salt’

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Configuration

Returns a new instance of Configuration.



14
15
16
17
18
# File 'lib/zas/authenticators/sequel_password_authenticator.rb', line 14

def initialize(attributes={})
  attributes.each do |k, v|
    self[k] = v
  end
end

Instance Attribute Details

#password_fieldObject

Returns the value of attribute password_field

Returns:

  • (Object)

    the current value of password_field



13
14
15
# File 'lib/zas/authenticators/sequel_password_authenticator.rb', line 13

def password_field
  @password_field
end

#salt_fieldObject

Returns the value of attribute salt_field

Returns:

  • (Object)

    the current value of salt_field



13
14
15
# File 'lib/zas/authenticators/sequel_password_authenticator.rb', line 13

def salt_field
  @salt_field
end

#table_nameObject

Returns the value of attribute table_name

Returns:

  • (Object)

    the current value of table_name



13
14
15
# File 'lib/zas/authenticators/sequel_password_authenticator.rb', line 13

def table_name
  @table_name
end

#username_fieldObject

Returns the value of attribute username_field

Returns:

  • (Object)

    the current value of username_field



13
14
15
# File 'lib/zas/authenticators/sequel_password_authenticator.rb', line 13

def username_field
  @username_field
end