Relyra.TestSupport (relyra v1.1.0)

Copy Markdown View Source

Test helpers for adapter and controller tests.

The helpers are designed to compose with Phoenix.ConnTest and the library's own resolver / user-mapper seams. They intentionally keep the call surface small so adopters can write a full SSO round-trip test without learning internal plumbing.

Summary

Functions

build_saml_response(opts \\ [])

See Relyra.TestSupport.FakeIdP.build_response/1.

fake_idp_metadata()

See Relyra.TestSupport.FakeIdP.metadata/0.

post_saml_response(conn, response_xml, opts \\ [])

@spec post_saml_response(Plug.Conn.t(), String.t(), keyword()) :: Plug.Conn.t()

saml_login(conn)

@spec saml_login(Plug.Conn.t()) :: {:ok, term()} | {:error, atom()}

setup_saml_connection(conn, opts \\ [])

@spec setup_saml_connection(
  Plug.Conn.t(),
  keyword()
) :: Plug.Conn.t()

sign_saml_response(builder, opts \\ [])

See Relyra.TestSupport.FakeIdP.sign/2.