pub struct Identity {
pub origin: IdentType,
/* private fields */
}Expand description
An identity that initiated an Event. Contains extra details about the session
and other info that can assist with server decision making.
Fields§
§origin: IdentTypeImplementations§
Source§impl Identity
impl Identity
pub fn access_scope(&self) -> AccessScope
pub fn project_with_scope(&self, scope: AccessScope) -> Self
pub fn get_session_id(&self) -> Uuid
pub fn get_session(&self) -> Option<&Session>
pub fn get_user_entry(&self) -> Option<Arc<EntrySealedCommitted>>
pub fn from_impersonate(ident: &Self) -> Self
pub fn is_internal(&self) -> bool
pub fn get_uuid(&self) -> Option<Uuid>
Sourcepub fn can_logout(&self) -> bool
pub fn can_logout(&self) -> bool
Indicate if the session associated with this identity has a session that can logout. Examples of sessions that can not logout are anonymous, tokens, or PIV sessions.
pub fn get_event_origin_id(&self) -> IdentityId
pub fn is_memberof(&self, group: Uuid) -> bool
pub fn get_memberof(&self) -> Option<&BTreeSet<Uuid>>
pub fn get_oauth2_consent_scopes( &self, oauth2_rs: Uuid, ) -> Option<&BTreeSet<String>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Identity
impl !RefUnwindSafe for Identity
impl Send for Identity
impl Sync for Identity
impl Unpin for Identity
impl !UnwindSafe for Identity
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].