feat: improve oidc only mode
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Simon 2026-03-16 17:14:54 +01:00
parent a8d9fe6121
commit 9b4f3b140c
Signed by: simon
GPG key ID: 40E7A58C4AA1EDB2
19 changed files with 330 additions and 43 deletions

View file

@ -0,0 +1,16 @@
defmodule Mv.Authorization.Checks.OidcOnlyActive do
@moduledoc """
Policy check: true when OIDC-only mode is active (Config.oidc_only?()).
Used to forbid password sign-in when only OIDC (SSO) sign-in is allowed.
"""
use Ash.Policy.SimpleCheck
alias Mv.Config
@impl true
def describe(_opts), do: "OIDC-only mode is active"
@impl true
def match?(_actor, _context, _opts), do: Config.oidc_only?()
end