Enum ruma_client_api::session::get_login_types::v3::LoginType
source · pub enum LoginType {
Password(PasswordLoginType),
Token(TokenLoginType),
Sso(SsoLoginType),
ApplicationService(ApplicationServiceLoginType),
// some variants omitted
}
Available on crate features
client
or server
only.Expand description
An authentication mechanism.
Variants§
Password(PasswordLoginType)
A password is supplied to authenticate.
Token(TokenLoginType)
Token-based login.
Sso(SsoLoginType)
SSO-based login.
ApplicationService(ApplicationServiceLoginType)
Application Service login.
Implementations§
source§impl LoginType
impl LoginType
sourcepub fn new(login_type: &str, data: JsonObject) -> Result<Self>
pub fn new(login_type: &str, data: JsonObject) -> Result<Self>
Creates a new LoginType
with the given login_type
string and data.
Prefer to use the public variants of LoginType
where possible; this constructor is
meant be used for unsupported login types only and does not allow setting
arbitrary data for supported ones.
sourcepub fn login_type(&self) -> &str
pub fn login_type(&self) -> &str
Returns a reference to the login_type
string.
sourcepub fn data(&self) -> Cow<'_, JsonObject>
pub fn data(&self) -> Cow<'_, JsonObject>
Returns the associated data.
Prefer to use the public variants of LoginType
where possible; this method is meant to
be used for unsupported login types only.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LoginType
impl<'de> Deserialize<'de> for LoginType
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LoginType
impl RefUnwindSafe for LoginType
impl Send for LoginType
impl Sync for LoginType
impl Unpin for LoginType
impl UnwindSafe for LoginType
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
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
)