TTL-based authorization code cache.
Stores authorization codes during the SAML authentication flow with a 30-second TTL.
Uses the cache module configured via config :ex_saml, cache: MyApp.Cache.
The take/1 function atomically retrieves and deletes the code,
ensuring single-use consumption.
Summary
Functions
Retrieves the authorization code data for the given key.
Stores authorization code data with the default TTL.
Stores only if the key doesn't already exist. Returns :ok or {:error, :already_exists}.
Atomically retrieves and deletes the authorization code (single-use).
Returns the default TTL for authorization codes (30 seconds).
Functions
Retrieves the authorization code data for the given key.
Stores authorization code data with the default TTL.
Stores only if the key doesn't already exist. Returns :ok or {:error, :already_exists}.
Atomically retrieves and deletes the authorization code (single-use).
Returns the default TTL for authorization codes (30 seconds).