pub struct RefreshFlow<E, R>where
E: Endpoint<R>,
R: WebRequest,{ /* private fields */ }Expand description
Takes requests from clients to refresh their access tokens.
Implementations§
Source§impl<E, R> RefreshFlow<E, R>where
E: Endpoint<R> + Send + Sync,
R: WebRequest + Send + Sync,
<R as WebRequest>::Error: Send + Sync,
impl<E, R> RefreshFlow<E, R>where
E: Endpoint<R> + Send + Sync,
R: WebRequest + Send + Sync,
<R as WebRequest>::Error: Send + Sync,
Sourcepub fn prepare(endpoint: E) -> Result<Self, E::Error>
pub fn prepare(endpoint: E) -> Result<Self, E::Error>
Wrap the endpoint if it supports handling refresh requests.
Also binds the endpoint to the particular WebRequest type through the type system. The
endpoint needs to provide (return Some):
- a
Registrarfromregistrar - an
Issuerfromissuer_mut
§Panics
Indirectly execute may panic when this flow is instantiated with an inconsistent
endpoint, for details see the documentation of Endpoint and execute. For
consistent endpoints, the panic is instead caught as an error here.
pub async fn execute(&mut self, request: R) -> Result<R::Response, E::Error>
Auto Trait Implementations§
impl<E, R> Freeze for RefreshFlow<E, R>where
E: Freeze,
impl<E, R> RefUnwindSafe for RefreshFlow<E, R>where
E: RefUnwindSafe,
R: RefUnwindSafe,
impl<E, R> Send for RefreshFlow<E, R>
impl<E, R> Sync for RefreshFlow<E, R>
impl<E, R> Unpin for RefreshFlow<E, R>
impl<E, R> UnwindSafe for RefreshFlow<E, R>where
E: UnwindSafe,
R: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more