Relyra.TestSupport.FakeIdP (relyra v1.2.0)

Copy Markdown View Source

A small in-process SAML response builder for tests.

The fake IdP does not attempt to model a real admin UI or cryptographic signing pipeline. It builds protocol-correct XML that exercises the SP pipeline, including the signature and assertion parsing paths used by the test suite.

Summary

Functions

The self-signed certificate PEM (a single-element cert chain) callers must trust to accept a FakeIdP.sign/2-produced Response. Derived from keypair/0 via the promoted genuine signer (D-03), so configuring a connection's cert_chain / idp_certificates with this PEM lets the verifier accept FakeIdP's real signatures.

Functions

build_response(opts \\ [])

@spec build_response(keyword()) :: Relyra.TestSupport.FakeIdP.Builder.t()

keypair()

@spec keypair() :: term()

metadata()

@spec metadata() :: String.t()

self_signed_cert_pem()

@spec self_signed_cert_pem() :: String.t()

The self-signed certificate PEM (a single-element cert chain) callers must trust to accept a FakeIdP.sign/2-produced Response. Derived from keypair/0 via the promoted genuine signer (D-03), so configuring a connection's cert_chain / idp_certificates with this PEM lets the verifier accept FakeIdP's real signatures.

sign(opts, extra_opts \\ [])

@spec sign(
  Relyra.TestSupport.FakeIdP.Builder.t() | keyword(),
  keyword()
) :: String.t()