nova_auth behaviour (nova_auth v0.2.0)
View SourceBehaviour for nova_auth configuration. Implementing modules define authentication settings (repo, schemas, token lifetimes). Configuration is cached in persistent_term for fast repeated access.
Password-related keys (repo, user_schema, token_schema) are only
required when using password authentication modules (nova_auth_accounts,
nova_auth_session, etc.). OIDC-only applications can omit them entirely.
Summary
Functions
Return the merged auth configuration for Mod, caching in persistent_term.
Return a single config value for Key from the auth module Mod.
Evict the cached configuration for Mod from persistent_term.
Types
Callbacks
-callback config() -> #{repo => module(), user_schema => module(), token_schema => module(), user_identity_field => atom(), user_password_field => atom(), session_validity_days => pos_integer(), confirm_validity_days => pos_integer(), reset_validity_hours => pos_integer(), hash_algorithm => pbkdf2_sha256 | bcrypt | argon2, token_bytes => pos_integer()}.
Functions
Return the merged auth configuration for Mod, caching in persistent_term.
Return a single config value for Key from the auth module Mod.
-spec invalidate_cache(module()) -> true.
Evict the cached configuration for Mod from persistent_term.