#[non_exhaustive]pub struct UiaaInfo {
pub flows: Vec<AuthFlow>,
pub completed: Vec<AuthType>,
pub params: Option<Box<RawValue>>,
pub session: Option<String>,
pub auth_error: Option<StandardErrorBody>,
}api and (crate features client-api-c or client-api-s) and (crate features client or server) only.Expand description
Information about available authentication flows and status for User-Interactive Authenticiation API.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.flows: Vec<AuthFlow>List of authentication flows available for this endpoint.
completed: Vec<AuthType>List of stages in the current flow completed by the client.
params: Option<Box<RawValue>>Authentication parameters required for the client to complete authentication.
To create a Box<RawJsonValue>, use serde_json::value::to_raw_value.
session: Option<String>Session key for client to use to complete authentication.
auth_error: Option<StandardErrorBody>Authentication-related errors for previous request returned by homeserver.
Implementations§
Source§impl UiaaInfo
impl UiaaInfo
Sourcepub fn params<'a, T>(&'a self, auth_type: &AuthType) -> Result<Option<T>, Error>where
T: Deserialize<'a>,
pub fn params<'a, T>(&'a self, auth_type: &AuthType) -> Result<Option<T>, Error>where
T: Deserialize<'a>,
Get the parameters for the given AuthType, if they are available in the params object.
Returns Ok(Some(_)) if the parameters for the authentication type were found and the
deserialization worked, Ok(None) if the parameters for the authentication type were not
found, and Err(_) if the parameters for the authentication type were found but their
deserialization failed.
§Example
use ruma_client_api::uiaa::{AuthType, LoginTermsParams};
let login_terms_params = uiaa_info.params::<LoginTermsParams>(&AuthType::Terms)?;Trait Implementations§
Source§impl<'de> Deserialize<'de> for UiaaInfo
impl<'de> Deserialize<'de> for UiaaInfo
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<UiaaInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<UiaaInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for UiaaInfo
impl Serialize for UiaaInfo
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for UiaaInfo
impl RefUnwindSafe for UiaaInfo
impl Send for UiaaInfo
impl Sync for UiaaInfo
impl Unpin for UiaaInfo
impl UnsafeUnpin for UiaaInfo
impl UnwindSafe for UiaaInfo
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,
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Arc<> Read more