pub struct AuthEvent<'a> { /* private fields */ }Expand description
What auth did, as an AuthHook receives it: on which panel, for which tenant, by whom, to
which account.
The request may not know the user yet: a sign-in has no session before it, and a session that
lapsed is stopped while auth resolves it, so read the actor and the tenant here, not through
auth::actor and tenant_id.
Implementations§
Source§impl<'a> AuthEvent<'a>
impl<'a> AuthEvent<'a>
Sourcepub fn kind(&self) -> AuthEventKind<'a>
pub fn kind(&self) -> AuthEventKind<'a>
What happened.
Sourcepub fn tenant(&self) -> Option<TenantId>
pub fn tenant(&self) -> Option<TenantId>
The tenant the session acted for; None outside every tenant, and before a session
exists.
Sourcepub fn actor(&self) -> Option<&'a (dyn PanelUser + 'static)>
pub fn actor(&self) -> Option<&'a (dyn PanelUser + 'static)>
The user who did it; None when no one was signed in: a sign-in no account answered, or
a mailed link opened without a session.
Sourcepub fn target_id(&self) -> Option<&str>
pub fn target_id(&self) -> Option<&str>
The PanelUser::user_id of the account it was done to, the actor’s own outside
impersonation; None when a sign-in named no account.
Sourcepub fn target_name(&self) -> Option<&'a str>
pub fn target_name(&self) -> Option<&'a str>
The display_name of the account it was done to; None when
the account was not loaded.