Relyra (relyra v1.5.4)

Copy Markdown View Source

Public entry points for strict-by-default SAML protocol flows.

Start with Getting Started for install, local proof, and your first IdP runbook. The two functions most host apps call are:

  • start_login/3 — build and store a request intent, then redirect (or POST) the user to the IdP.
  • consume_response/3 — verify the SAML response on the ACS path and return a %Relyra.LoginResult{} or a typed %Relyra.Error{}.

Mount HTTP routes with Relyra.Phoenix.Router.saml_routes/2 (see Relyra.Phoenix.Router). Configure connections via Relyra.ConnectionResolver and the behaviour seams documented under Relyra.* in this reference.

Summary

Functions

consume_logout(connection, raw_payload, opts \\ [])

@spec consume_logout(map(), binary(), keyword()) ::
  {:ok, map()} | {:error, Relyra.Error.t()}

Consumes an inbound SAML LogoutRequest or LogoutResponse payload.

consume_response(response_payload, request_intent_or_opts, opts \\ [])

@spec consume_response(binary(), map() | keyword(), keyword()) ::
  {:ok, map()} | {:error, Relyra.Error.t()}

start_login(connection, relay_context, opts \\ [])

@spec start_login(map(), map(), keyword()) ::
  {:ok, map()} | {:error, Relyra.Error.t()}

start_logout(connection, session_index, opts \\ [])

@spec start_logout(map(), binary(), keyword()) ::
  {:ok, map()} | {:error, Relyra.Error.t()}

Starts an SP-initiated Single Logout flow.