Auth Stream Access (ASA) — subscribe to real-time authorization events.
ASA lets you run your own external authorization logic. Lithic calls your webhook endpoint for every authorization request, and you respond with an approve/decline decision within the timeout window.
HMAC Verification
Use Lithic.Webhook.verify/4 with the secret from get_secret/1 to verify
incoming ASA requests.
Responding to Authorization Challenges
Lithic.AuthStreamAccess.respond_to_challenge(
"challenge_token",
%{result: "APPROVED"}
)
Summary
Functions
Check the enrollment status of a responder endpoint.
Disenroll from ASA webhooks.
Enroll a responder endpoint for ASA webhooks.
Retrieve the HMAC secret for verifying ASA webhook requests.
Respond to an Authorization Challenge (step-up auth).
Rotate the HMAC secret. Previous secret remains valid for 24h.
Functions
@spec check_enrollment(keyword()) :: {:ok, map()} | {:error, Lithic.Error.t()}
Check the enrollment status of a responder endpoint.
@spec disenroll(keyword()) :: {:ok, map()} | {:error, Lithic.Error.t()}
Disenroll from ASA webhooks.
@spec enroll( map(), keyword() ) :: {:ok, map()} | {:error, Lithic.Error.t()}
Enroll a responder endpoint for ASA webhooks.
@spec get_secret(keyword()) :: {:ok, map()} | {:error, Lithic.Error.t()}
Retrieve the HMAC secret for verifying ASA webhook requests.
@spec respond_to_challenge(String.t(), map(), keyword()) :: {:ok, map()} | {:error, Lithic.Error.t()}
Respond to an Authorization Challenge (step-up auth).
@spec rotate_secret(keyword()) :: {:ok, map()} | {:error, Lithic.Error.t()}
Rotate the HMAC secret. Previous secret remains valid for 24h.