pub enum AuthResolution {
Provided {
request: AuthRequest,
credentials: MetadataMap,
},
Cancelled {
request: AuthRequest,
},
}Expand description
The outcome of an AuthRequest after the user interacts with the auth flow.
Variants§
Provided
The user completed authentication and supplied credentials.
Fields
§
request: AuthRequestThe original auth request.
§
credentials: MetadataMapCredentials the user provided (tokens, keys, etc.).
Cancelled
The user cancelled the authentication flow.
Fields
§
request: AuthRequestThe original auth request that was cancelled.
Implementations§
Source§impl AuthResolution
impl AuthResolution
Sourcepub fn provided(request: AuthRequest, credentials: MetadataMap) -> Self
pub fn provided(request: AuthRequest, credentials: MetadataMap) -> Self
Builds a successful auth resolution.
Sourcepub fn cancelled(request: AuthRequest) -> Self
pub fn cancelled(request: AuthRequest) -> Self
Builds a cancelled auth resolution.
Sourcepub fn request(&self) -> &AuthRequest
pub fn request(&self) -> &AuthRequest
Returns a reference to the underlying AuthRequest regardless of
the resolution variant.
Trait Implementations§
Source§impl Clone for AuthResolution
impl Clone for AuthResolution
Source§fn clone(&self) -> AuthResolution
fn clone(&self) -> AuthResolution
Returns a duplicate of the value. Read more
1.0.0 · 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 AuthResolution
impl Debug for AuthResolution
Source§impl<'de> Deserialize<'de> for AuthResolution
impl<'de> Deserialize<'de> for AuthResolution
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for AuthResolution
impl PartialEq for AuthResolution
Source§impl Serialize for AuthResolution
impl Serialize for AuthResolution
impl Eq for AuthResolution
impl StructuralPartialEq for AuthResolution
Auto Trait Implementations§
impl Freeze for AuthResolution
impl RefUnwindSafe for AuthResolution
impl Send for AuthResolution
impl Sync for AuthResolution
impl Unpin for AuthResolution
impl UnsafeUnpin for AuthResolution
impl UnwindSafe for AuthResolution
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