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§
Sourcefn mint(&self) -> String
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.
Sourcefn push(&self, request: PushedRequest) -> String
fn push(&self, request: PushedRequest) -> String
Stores a freshly pushed request, under a request_uri from
ParStore::mint.
Sourcefn get(&self, request_uri: &str) -> Option<PushedRequest>
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.
Sourcefn take(&self, request_uri: &str) -> Option<PushedRequest>
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.