Struct kanidmd_lib::idm::account::Account
source · pub struct Account {Show 17 fields
pub name: String,
pub spn: String,
pub displayname: String,
pub uuid: Uuid,
pub sync_parent_uuid: Option<Uuid>,
pub groups: Vec<Group<()>>,
pub primary: Option<Credential>,
pub passkeys: BTreeMap<Uuid, (String, Passkey)>,
pub attested_passkeys: BTreeMap<Uuid, (String, AttestedPasskey)>,
pub valid_from: Option<OffsetDateTime>,
pub expire: Option<OffsetDateTime>,
pub radius_secret: Option<String>,
pub ui_hints: BTreeSet<UiHint>,
pub mail_primary: Option<String>,
pub mail: Vec<String>,
pub credential_update_intent_tokens: BTreeMap<String, IntentTokenState>,
pub apps_pwds: BTreeMap<Uuid, Vec<ApplicationPassword>>,
/* private fields */
}
Fields§
§name: String
§spn: String
§displayname: String
§uuid: Uuid
§sync_parent_uuid: Option<Uuid>
§groups: Vec<Group<()>>
§primary: Option<Credential>
§passkeys: BTreeMap<Uuid, (String, Passkey)>
§attested_passkeys: BTreeMap<Uuid, (String, AttestedPasskey)>
§valid_from: Option<OffsetDateTime>
§expire: Option<OffsetDateTime>
§radius_secret: Option<String>
§ui_hints: BTreeSet<UiHint>
§mail_primary: Option<String>
§mail: Vec<String>
§credential_update_intent_tokens: BTreeMap<String, IntentTokenState>
§apps_pwds: BTreeMap<Uuid, Vec<ApplicationPassword>>
Implementations§
source§impl Account
impl Account
sourcepub fn check_within_valid_time(
ct: Duration,
valid_from: Option<&OffsetDateTime>,
expire: Option<&OffsetDateTime>,
) -> bool
pub fn check_within_valid_time( ct: Duration, valid_from: Option<&OffsetDateTime>, expire: Option<&OffsetDateTime>, ) -> bool
Determine if an entry is within it’s validity period using it’s valid_from
and
expire
attributes. true
indicates the account is within the valid period.
sourcepub fn is_within_valid_time(&self, ct: Duration) -> bool
pub fn is_within_valid_time(&self, ct: Duration) -> bool
Determine if this account is within it’s validity period. true
indicates the
account is within the valid period.
Get related inputs, such as account name, email, etc. This is used for password quality checking.
pub fn primary_cred_uuid_and_policy(&self) -> Option<(Uuid, CredSoftLockPolicy)>
pub fn is_anonymous(&self) -> bool
Trait Implementations§
source§impl From<BuiltinAccount> for Account
impl From<BuiltinAccount> for Account
source§fn from(value: BuiltinAccount) -> Self
fn from(value: BuiltinAccount) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Account
impl RefUnwindSafe for Account
impl Send for Account
impl Sync for Account
impl Unpin for Account
impl UnwindSafe for Account
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