Result of a call to ExSaml.Metadata.validate/1 or ExSaml.Metadata.validate/2.
The struct holds two lists of findings: errors (severity :error) and
warnings (severity :warning). See violation/0 for the shape of an
individual entry.
Convention used by ExSaml.Metadata.validate/2:
{:ok, %__MODULE__{errors: [], warnings: warnings}}when no error-level violation is found (warnings may still be present).{:error, %__MODULE__{errors: errors, warnings: warnings}}when at least one error-level violation is found.- Any code listed in
:ignoreis removed from both lists.
Summary
Types
@type violation() :: %{ code: atom(), severity: :error | :warning, message: String.t(), path: String.t() | nil, spec_reference: String.t() | nil }
A single validation finding.
:code— stable atom identifier for the rule (e.g.:invalid_acs_binding).:severity—:errorfor spec violations (and some always-error defaults),:warningfor best-practice findings that are not hard failures by default.:message— human-readable description of the violation.:path— XPath-like pointer to the offending node, ornilfor document-level violations (e.g.:invalid_xml,:invalid_root_element) that have no meaningful location.:spec_reference— free-form reference to the SAML / OASIS section that justifies the rule, ornilwhen none applies.