Skip to main content

ParStore

Trait ParStore 

Source
pub trait ParStore: Send + Sync {
    // Required methods
    fn mint(&self) -> String;
    fn push(&self, request: PushedRequest) -> String;
    fn get(&self, request_uri: &str) -> Option<PushedRequest>;
    fn take(&self, request_uri: &str) -> Option<PushedRequest>;
}
Expand description

Where pushed requests live between POST /oauth/par and authorize.

Required Methods§

Source

fn mint(&self) -> String

Mints a fresh request_uri, drawn from the same random source and format ParStore::push uses, without storing anything under it.

push_for_unresolved_hint calls this rather than reaching for its own random source: a request_uri this endpoint hands back is this store’s format to own, whether or not anything is ever stored under it, so there is exactly one place that decides what one looks like.

Source

fn push(&self, request: PushedRequest) -> String

Stores a freshly pushed request, under a request_uri from ParStore::mint.

Source

fn get(&self, request_uri: &str) -> Option<PushedRequest>

The request named by request_uri, left where it is, expired or not. authorize answers every load of the same request_uri, which RFC 9126 §4 allows, and refuses an expired one to its client.

Source

fn take(&self, request_uri: &str) -> Option<PushedRequest>

Removes the request named by request_uri, handing it back if it has not expired. What undoes a push whose decision record was refused or displaced.

Implementors§