pub enum UpstreamOAuthAuthorizationSessionState {
Pending,
Completed {
completed_at: DateTime<Utc>,
link_id: Ulid,
id_token: Option<String>,
},
Consumed {
completed_at: DateTime<Utc>,
consumed_at: DateTime<Utc>,
link_id: Ulid,
id_token: Option<String>,
},
}
Variants§
Implementations§
source§impl UpstreamOAuthAuthorizationSessionState
impl UpstreamOAuthAuthorizationSessionState
sourcepub fn complete(
self,
completed_at: DateTime<Utc>,
link: &UpstreamOAuthLink,
id_token: Option<String>,
) -> Result<Self, InvalidTransitionError>
pub fn complete( self, completed_at: DateTime<Utc>, link: &UpstreamOAuthLink, id_token: Option<String>, ) -> Result<Self, InvalidTransitionError>
sourcepub fn link_id(&self) -> Option<Ulid>
pub fn link_id(&self) -> Option<Ulid>
Get the link ID for the upstream OAuth 2.0 authorization session.
Returns None
if the upstream OAuth 2.0 authorization session state is
Pending
.
sourcepub fn completed_at(&self) -> Option<DateTime<Utc>>
pub fn completed_at(&self) -> Option<DateTime<Utc>>
Get the time at which the upstream OAuth 2.0 authorization session was completed.
Returns None
if the upstream OAuth 2.0 authorization session state is
Pending
.
sourcepub fn id_token(&self) -> Option<&str>
pub fn id_token(&self) -> Option<&str>
Get the ID token for the upstream OAuth 2.0 authorization session.
Returns None
if the upstream OAuth 2.0 authorization session state is
Pending
.
sourcepub fn consumed_at(&self) -> Option<DateTime<Utc>>
pub fn consumed_at(&self) -> Option<DateTime<Utc>>
Get the time at which the upstream OAuth 2.0 authorization session was consumed.
Returns None
if the upstream OAuth 2.0 authorization session state is
not Consumed
.
sourcepub fn is_pending(&self) -> bool
pub fn is_pending(&self) -> bool
Returns true
if the upstream OAuth 2.0 authorization session state is
Pending
.
sourcepub fn is_completed(&self) -> bool
pub fn is_completed(&self) -> bool
Returns true
if the upstream OAuth 2.0 authorization session state is
Completed
.
sourcepub fn is_consumed(&self) -> bool
pub fn is_consumed(&self) -> bool
Returns true
if the upstream OAuth 2.0 authorization session state is
Consumed
.
Trait Implementations§
source§impl Clone for UpstreamOAuthAuthorizationSessionState
impl Clone for UpstreamOAuthAuthorizationSessionState
source§fn clone(&self) -> UpstreamOAuthAuthorizationSessionState
fn clone(&self) -> UpstreamOAuthAuthorizationSessionState
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for UpstreamOAuthAuthorizationSessionState
impl Default for UpstreamOAuthAuthorizationSessionState
source§fn default() -> UpstreamOAuthAuthorizationSessionState
fn default() -> UpstreamOAuthAuthorizationSessionState
source§impl PartialEq for UpstreamOAuthAuthorizationSessionState
impl PartialEq for UpstreamOAuthAuthorizationSessionState
source§fn eq(&self, other: &UpstreamOAuthAuthorizationSessionState) -> bool
fn eq(&self, other: &UpstreamOAuthAuthorizationSessionState) -> bool
self
and other
values to be equal, and is used
by ==
.impl Eq for UpstreamOAuthAuthorizationSessionState
impl StructuralPartialEq for UpstreamOAuthAuthorizationSessionState
Auto Trait Implementations§
impl Freeze for UpstreamOAuthAuthorizationSessionState
impl RefUnwindSafe for UpstreamOAuthAuthorizationSessionState
impl Send for UpstreamOAuthAuthorizationSessionState
impl Sync for UpstreamOAuthAuthorizationSessionState
impl Unpin for UpstreamOAuthAuthorizationSessionState
impl UnwindSafe for UpstreamOAuthAuthorizationSessionState
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more