Phauxth v0.16.0 Phauxth.Config View Source

This module provides an abstraction layer for configuration.

The following are valid configuration items.

nametypedefault
log_levelatom:info
drop_user_keyslist of atoms[]
token_saltstringN/A

Examples

The simplest way to change the default values would be to add a phauxth entry to the config.exs file in your project, like the following example.

config :phauxth,
  log_level: :warn,
  drop_user_keys: [:shoe_size]

Link to this section Summary

Functions

The keys that are removed from the user struct before it is passed on to another function

Generate a random salt for use with token authentication

The log level for Phauxth logs

The salt to be used when creating and verifying tokens

Link to this section Functions

The keys that are removed from the user struct before it is passed on to another function.

This should be a list of atoms.

By default, :password_hash, :password and :otp_secret are removed, and this option allows you to add to this list.

Link to this function gen_token_salt(length \\ 8) View Source

Generate a random salt for use with token authentication.

The log level for Phauxth logs.

This should either be an atom, :debug, :info, :warn or :error, or false.

The default is :info, which means that :info, :warn and :error logs will be returned.

The salt to be used when creating and verifying tokens.