class

Authly::InMemoryPARStore

Inherits Authly::PARStore < Reference < Object

In-memory implementation of PAR store

Constructors

new(default_ttl : Time::Span = 90.seconds)
Source

Instance methods

cleanup_expired

Clean up expired request URIs

Source
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