Authly::InMemoryPARStore
Inherits Authly::PARStore < Reference < Object
In-memory implementation of PAR store
Constructors
new(default_ttl : Time::Span = 90.seconds)
SourceInstance 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.
fetch(request_uri : String) : PARData | Nil
Sourcestore(request_uri : String, params : Hash(String, String), client_id : String, ttl : Time::Span = 90.seconds)
Sourcevalid?(request_uri : String) : Bool
Source