Auctoritas v0.1.2 Auctoritas.Config View Source
Link to this section Summary
Link to this section Functions
Link to this function
new(options \\ []) View Source
Create new config for Auctoritas
Arguments:
- secret_key: Secret key to use when generating authentication tokens.
- data_storage: Data storage module to save data and manage authentication tokens. (DEFAULT value exists)
- token_manager: Token manager module to generate and read tokens. (DEFAULT value exists)
Examples
iex> Auctoritas.Config.new()
%Auctoritas.Config{
name: "auctoritas_default",
data_storage: Auctoritas.AuthenticationManager.DataStorage,
token_manager: Auctoritas.AuthenticationManager.TokenManager
}
iex> Auctoritas.Config.new(name: "custom_name")
%Auctoritas.Config{
name: "custom_name",
data_storage: Auctoritas.AuthenticationManager.DataStorage,
token_manager: Auctoritas.AuthenticationManager.TokenManager
}
Link to this function
read() View Source
Read Auctoritas config from config files