pub struct UserBuilder<'a> { /* private fields */ }Expand description
Builder for User.
Implementations§
Source§impl<'a> UserBuilder<'a>
impl<'a> UserBuilder<'a>
Sourcepub fn default_project_id<VALUE: Into<Option<Cow<'a, str>>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn default_project_id<VALUE: Into<Option<Cow<'a, str>>>>( &mut self, value: VALUE, ) -> &mut Self
The new ID of the default project for the user.
Sourcepub fn description<VALUE: Into<Option<Cow<'a, str>>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn description<VALUE: Into<Option<Cow<'a, str>>>>( &mut self, value: VALUE, ) -> &mut Self
The description of the user resource.
Sourcepub fn domain_id<VALUE: Into<Cow<'a, str>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn domain_id<VALUE: Into<Cow<'a, str>>>( &mut self, value: VALUE, ) -> &mut Self
The ID of the new domain for the user. The ability to change the domain of a user is now deprecated, and will be removed in subsequent release. It is already disabled by default in most Identity service implementations.
Sourcepub fn enabled<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn enabled<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
Enables or disables the user. An enabled user can authenticate and
receive authorization. A disabled user cannot authenticate or receive
authorization. Additionally, all tokens that the user holds become no
longer valid. If you reenable this user, pre-existing tokens do not
become valid. To enable the user, set to true. To disable the user,
set to false. Default is true.
Sourcepub fn federated<VALUE: Into<Vec<Federated<'a>>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn federated<VALUE: Into<Vec<Federated<'a>>>>( &mut self, value: VALUE, ) -> &mut Self
List of federated objects associated with a user. Each object in the
list contains the idp_id and protocols. protocols is a list of
objects, each of which contains protocol_id and unique_id of the
protocol and user respectively. For example:
"federated": [
{
"idp_id": "efbab5a6acad4d108fec6c63d9609d83",
"protocols": [
{"protocol_id": mapped, "unique_id": "test@example.com"}
]
}
]Sourcepub fn name<VALUE: Into<Cow<'a, str>>>(&mut self, value: VALUE) -> &mut Self
pub fn name<VALUE: Into<Cow<'a, str>>>(&mut self, value: VALUE) -> &mut Self
The new name for the user. Must be unique within the owning domain.
Sourcepub fn options<VALUE: Into<Options<'a>>>(&mut self, value: VALUE) -> &mut Self
pub fn options<VALUE: Into<Options<'a>>>(&mut self, value: VALUE) -> &mut Self
The resource options for the user. Available resource options are
ignore_change_password_upon_first_use, ignore_password_expiry,
ignore_lockout_failure_attempts, lock_password,
multi_factor_auth_enabled, and multi_factor_auth_rules
ignore_user_inactivity.
Trait Implementations§
Source§impl<'a> Clone for UserBuilder<'a>
impl<'a> Clone for UserBuilder<'a>
Source§fn clone(&self) -> UserBuilder<'a>
fn clone(&self) -> UserBuilder<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for UserBuilder<'a>
impl<'a> RefUnwindSafe for UserBuilder<'a>
impl<'a> Send for UserBuilder<'a>
impl<'a> Sync for UserBuilder<'a>
impl<'a> Unpin for UserBuilder<'a>
impl<'a> UnsafeUnpin for UserBuilder<'a>
impl<'a> UnwindSafe for UserBuilder<'a>
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§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> 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>
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>
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