pub enum LoginInfo {
Password(Password),
Token(Token),
ApplicationService(ApplicationService),
// some variants omitted
}
Available on crate features
client
or server
only.Expand description
The authentication mechanism.
Variants§
Password(Password)
An identifier and password are supplied to authenticate.
Token(Token)
Token-based login.
ApplicationService(ApplicationService)
Application Service-specific login.
Implementations§
source§impl LoginInfo
impl LoginInfo
sourcepub fn new(login_type: &str, data: JsonObject) -> Result<Self>
pub fn new(login_type: &str, data: JsonObject) -> Result<Self>
Creates a new IncomingLoginInfo
with the given login_type
string, session and data.
Prefer to use the public variants of IncomingLoginInfo
where possible; this
constructor is meant be used for unsupported authentication mechanisms only and
does not allow setting arbitrary data for supported ones.
§Errors
Returns an error if the login_type
is known and serialization of data
to the
corresponding IncomingLoginInfo
variant fails.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LoginInfo
impl<'de> Deserialize<'de> for LoginInfo
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 LoginInfo
impl RefUnwindSafe for LoginInfo
impl Send for LoginInfo
impl Sync for LoginInfo
impl Unpin for LoginInfo
impl UnwindSafe for LoginInfo
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
)