pub struct OAuthAuthorizationFlow { /* private fields */ }Expand description
Reusable OAuth authorization-code state machine and token provider.
Build this type with OAuthAuthorizationFlow::builder, call
authorize for a fully driven flow or
begin for explicit pending/authorized states, then install
the same value as both TokenProvider and OAuthScopeEscalationHandler.
Implementations§
Source§impl OAuthAuthorizationFlow
impl OAuthAuthorizationFlow
Sourcepub fn builder(resource_url: impl Into<String>) -> OAuthAuthorizationFlowBuilder
pub fn builder(resource_url: impl Into<String>) -> OAuthAuthorizationFlowBuilder
Begin building a state machine for resource_url.
Sourcepub async fn begin<I, S>(
&self,
scopes: I,
) -> Result<OAuthAuthorizationStart, OAuthClientError>
pub async fn begin<I, S>( &self, scopes: I, ) -> Result<OAuthAuthorizationStart, OAuthClientError>
Discover, register, restore or create authorization state, and return the next explicit state.
Drive a complete authorization using the configured
OAuthAuthorizationHandler.
Sourcepub async fn complete_callback_url(
&self,
callback_url: &str,
) -> Result<(), OAuthClientError>
pub async fn complete_callback_url( &self, callback_url: &str, ) -> Result<(), OAuthClientError>
Resume a persisted authorization attempt from a callback URL.
Return the currently authorized scope set, if any.
Trait Implementations§
Source§impl Clone for OAuthAuthorizationFlow
impl Clone for OAuthAuthorizationFlow
Source§fn clone(&self) -> OAuthAuthorizationFlow
fn clone(&self) -> OAuthAuthorizationFlow
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OAuthAuthorizationFlow
impl Debug for OAuthAuthorizationFlow
Source§impl OAuthScopeEscalationHandler for OAuthAuthorizationFlow
impl OAuthScopeEscalationHandler for OAuthAuthorizationFlow
Reauthorize for the stable-order scope union in
request.Auto Trait Implementations§
impl !RefUnwindSafe for OAuthAuthorizationFlow
impl !UnwindSafe for OAuthAuthorizationFlow
impl Freeze for OAuthAuthorizationFlow
impl Send for OAuthAuthorizationFlow
impl Sync for OAuthAuthorizationFlow
impl Unpin for OAuthAuthorizationFlow
impl UnsafeUnpin for OAuthAuthorizationFlow
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