Relyra.ConnectionResolver behaviour (relyra v1.1.0)

Copy Markdown View Source

Public extension contract for resolving the SAML connection context.

Resolvers must return a fully normalized %Relyra.Connection{} runtime snapshot. Persistence details stay behind the adapter boundary; runtime consumers receive one canonical shape:

  • :connection_id
  • :idp_entity_id
  • :sp_entity_id
  • :acs_url
  • :idp_sso_url
  • :idp_certificates

:cert_chain remains compatibility-only glue during the certificate contract migration window. Callers should treat :idp_certificates as the canonical trust field.

Summary

Callbacks

resolve_connection(request_context, opts)

@callback resolve_connection(request_context :: map(), opts :: keyword()) ::
  {:ok, Relyra.Connection.t()} | {:error, Relyra.Error.t()}

Functions

resolve_connection(request_context, opts \\ [])

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