module

Authly::PARStore

Abstract module for PAR storage

Instance methods

consume(request_uri : String) : Bool

Single use: true to exactly one caller of a stored, unexpired request_uri, false for every other (replay, unknown, expired). The authorization endpoint uses ONLY this as its gate, so it must be one atomic delete-and-report operation (Redis DEL returning 1, SQL DELETE with affected rows), never a fetch/valid? followed by a delete.

Source
fetch(request_uri : String) : PARData | Nil
Source
store(request_uri : String, params : Hash(String, String), client_id : String, ttl : Time::Span = 90.seconds)
Source
valid?(request_uri : String) : Bool
Source