# `ExSaml.AuthHandler`
[🔗](https://github.com/docJerem/ex_saml/blob/main/lib/ex_saml/auth_handler.ex#L1)

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

## Functions

  * `request_idp/2` - Initiates a full SAML SSO request to a specific IdP
  * `send_signin_req/1` - Sends a sign-in request using the IdP from `conn.private[:ex_saml_idp]`
  * `send_signout_req/1` - Sends a sign-out request for the current session

# `request_idp`

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`

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`

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.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
