nova_auth_oidc_plugin (nova_auth_oidc v0.1.1)
View SourceNova plugin that protects routes by checking for an authenticated actor
in the session. Uses nova_auth_actor for session storage, making it
compatible with any auth strategy.
Usage
#{prefix => ~"/protected",
plugins => [{pre_request, [{nova_auth_oidc_plugin, #{
auth_mod => my_oidc_config,
provider => authentik,
on_unauthorized => {redirect, ~"/auth/authentik/login"}
}}]}],
routes => [...]}Options
auth_mod-- OIDC config module (used to build login redirect URL)provider-- provider atom for redirect URL constructionon_unauthorized-- action when no actor session exists:{redirect, Url}-- redirect to login{status, Code}-- return HTTP status (e.g., 401)