Struct mz_frontegg_auth::auth::AuthSessionHandle
source · pub struct AuthSessionHandle {
ident: Arc<AuthSessionIdent>,
external_metadata_rx: Receiver<ExternalUserMetadata>,
authenticator: Arc<AuthenticatorInner>,
app_password: AppPassword,
}
Expand description
A handle to an authentication session.
An authentication session represents a duration of time during which a user’s authentication is known to be valid.
An authentication session begins with a successful API key exchange with Frontegg. While there is at least one outstanding handle to the session, the session’s metadata and validity are refreshed with Frontegg at a regular interval. The session ends when all outstanding handles are dropped and the refresh interval is reached.
AuthSessionHandle::external_metadata_rx
can be used to receive events if
the session’s metadata is updated.
AuthSessionHandle::expired
can be used to learn if the session has
failed to refresh the validity of the API key.
Fields§
§ident: Arc<AuthSessionIdent>
§external_metadata_rx: Receiver<ExternalUserMetadata>
§authenticator: Arc<AuthenticatorInner>
Hold a handle to the AuthenticatorInner
so we can record when this session was dropped.
app_password: AppPassword
Used to record when the session linked with this AppPassword
was dropped.
Implementations§
source§impl AuthSessionHandle
impl AuthSessionHandle
sourcepub fn external_metadata_rx(&self) -> Receiver<ExternalUserMetadata>
pub fn external_metadata_rx(&self) -> Receiver<ExternalUserMetadata>
Mints a receiver for updates to the session user’s external metadata.
Trait Implementations§
source§impl Clone for AuthSessionHandle
impl Clone for AuthSessionHandle
source§fn clone(&self) -> AuthSessionHandle
fn clone(&self) -> AuthSessionHandle
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AuthSessionHandle
impl Debug for AuthSessionHandle
Auto Trait Implementations§
impl Freeze for AuthSessionHandle
impl !RefUnwindSafe for AuthSessionHandle
impl Send for AuthSessionHandle
impl Sync for AuthSessionHandle
impl Unpin for AuthSessionHandle
impl !UnwindSafe for AuthSessionHandle
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<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
source§impl<T, U> OverrideFrom<Option<&T>> for Uwhere
U: OverrideFrom<T>,
impl<T, U> OverrideFrom<Option<&T>> for Uwhere
U: OverrideFrom<T>,
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> ProgressEventTimestamp for T
impl<T> ProgressEventTimestamp for T
source§impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
source§fn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
RustType::from_proto
.source§fn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
RustType::into_proto
.source§impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
source§fn plus_equals(&mut self, rhs: &&'a S)
fn plus_equals(&mut self, rhs: &&'a S)
std::ops::AddAssign
, for types that do not implement AddAssign
.