module

Authly::ChallengeStore

Instance methods

cleanup_expired
Source
consume!(challenge_id : String) : Challenge | Nil

Atomically deletes and returns an unexpired challenge, or nil if unknown, expired, or already consumed.

Source
delete(challenge_id : String) : Bool
Source
fetch(challenge_id : String) : Challenge | Nil
Source
record_attempt!(challenge_id : String, max_attempts : Int32 = 1) : Challenge

Atomically records a verification attempt against challenge_id. Raises Error.expired_challenge if expired, or Error.invalid_grant if missing/consumed.

Source
store(challenge_id : String, challenge : Challenge) : Challenge
Source
store(challenge : Challenge) : Challenge
Source
valid?(challenge_id : String) : Bool
Source