What's the name of a module or atom in a config section for?

Let’s say this code:

config :guardian, Guardian,
  allowed_algos: ["HS512"], # optional
  verify_module: Guardi

or this

config :guardian, :test123,
  allowed_algos: ["HS512"], # optional
  verify_module: Guardi

What are Guardian and :test123 for?
Are they mandatory?

Where is it described in the documentation of config files?

The main syntax is config Application, Key, Value, so :guardian is the application name, the Guardian or :test123 are the key’s, and the rest is the value, or in this case a key-value list (that config will ‘merge’ with).

How they are used and what format it should be depends on the application itself.

2 Likes