API Reference maat_feather v0.2.0
modules
Modules
keyserver
KeyServer
# config/config.exs
config :maat_feather, MaatFeather.Auth.KeyServer,
private_key_size:
if(System.get_env("PRIVATE_KEY_SIZE") != nil,
do: String.to_integer(System.get_env("PRIVATE_KEY_SIZE")),
else: 2048
),
exp:
if(System.get_env("PRIVATE_KEY_EXP") != nil,
do: String.to_integer(System.get_env("PRIVATE_KEY_EXP")),
else: :timer.minutes(30)
),
key_rotation_interval:
if(System.get_env("KEY_ROTATION_INTERVAL") != nil,
do: String.to_integer(System.get_env("KEY_ROTATION_INTERVAL")),
else: :timer.minutes(1)
),
redis_host: System.get_env("REDIS_HOST", "localhost"),
redis_port:
if(System.get_env("REDIS_PORT") != nil,
do: String.to_integer(System.get_env("REDIS_PORT")),
else: 6379
)
totp
TOTP
# config/config.exs
config :maat_feather, MaatFeather.Auth.TOTP,
secret_key_size:
if(System.get_env("TOTP_SECRET_KEY_SIZE") != nil,
do: String.to_integer(System.get_env("TOTP_SECRET_KEY_SIZE")),
else: 10
),
iss: System.get_env("AUTH_ISS", "maat_feather")
totpsecretkey
TOTPSecretKey
Generate a new secret key and encode/decode it.
token
Token
# config/config.exs
config :maat_feather, MaatFeather.Auth.Token,
alg: System.get_env("TOKEN_ALG", "RS256"),
exp:
if(System.get_env("TOKEN_EXP") != nil,
do: String.to_integer(System.get_env("TOKEN_EXP")),
else: :timer.minutes(15)
),
iss: System.get_env("AUTH_ISS", "maat_feather")
The Users context.
The entrypoint for defining your web interface, such as controllers, views, channels and so on.
Controller for authentication.
Conveniences for translating and building error messages.
Translates controller action results into valid Plug.Conn
responses.
A module providing Internationalization with a gettext-based API.
OAuth2 controller.
Plug to user ensure authentication.
Module with named helpers generated from MaatFeatherWeb.Router.