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: IdentType
Implementations§
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> AsTaggedExplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedExplicit<'a> for Twhere
T: 'a,
§impl<'a, T> AsTaggedImplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedImplicit<'a> 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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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 moresource§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>
Wrap the input message
T
in a tonic::Request