ExSaml.SPHandler (ex_saml v1.0.2)

Copy Markdown View Source

Handles Service Provider SAML responses: metadata generation, assertion consumption, and logout handling.

Functions

Summary

Functions

Processes the IdP sign-in response and extracts the SAML assertion.

Handles an IdP-initiated logout request.

Processes the IdP logout response and redirects to the target URL.

Returns the SP metadata XML for the IdP in conn.private[:ex_saml_idp].

Returns the fallback target URL from application config (defaults to "/").

Returns the target URL from session or relay state cache.

Functions

consume_signin_response(conn)

Processes the IdP sign-in response and extracts the SAML assertion.

Returns {:ok, %{assertion: assertion, nonce: nonce, user_token: token, redirect_uri: uri}} on success, or {:error, reason} on failure.

consume_signin_response(conn, idp_data)

handle_logout_request(conn)

Handles an IdP-initiated logout request.

handle_logout_response(conn)

Processes the IdP logout response and redirects to the target URL.

send_metadata(conn)

Returns the SP metadata XML for the IdP in conn.private[:ex_saml_idp].

target_url()

Returns the fallback target URL from application config (defaults to "/").

target_url(conn, relay_state)

Returns the target URL from session or relay state cache.