ExSaml.AuthHandler (ex_saml v1.0.2)

Copy Markdown View Source

Handles SAML authentication requests (sign-in and sign-out) with the Identity Provider.

Functions

Summary

Functions

Handles the full SAML request to the IdP without requiring an intermediate HTML form. Can be called directly in a Phoenix controller action.

Sends a SAML sign-in request to the IdP.

Sends a SAML sign-out request to the IdP.

Functions

request_idp(conn, idp_id)

Handles the full SAML request to the IdP without requiring an intermediate HTML form. Can be called directly in a Phoenix controller action.

You do not need to call initiate_sso_req, then send_signin_req: the full processus is done.

send_signin_req(conn)

Sends a SAML sign-in request to the IdP.

Expects conn.private[:ex_saml_idp] and conn.private[:ex_saml_target_url] to be set. If the user already has a valid assertion for this IdP, redirects to the target URL.

send_signout_req(conn)

Sends a SAML sign-out request to the IdP.

Expects conn.private[:ex_saml_idp] to be set. Requires an active assertion for the current IdP, otherwise returns 403.