pub enum QrAuthMessage {
LoginProtocols {
protocols: Vec<LoginProtocolType>,
homeserver: Url,
},
LoginProtocol {
device_authorization_grant: AuthorizationGrant,
protocol: LoginProtocolType,
device_id: Curve25519PublicKey,
},
LoginProtocolAccepted,
LoginSuccess,
LoginDeclined,
LoginFailure {
reason: LoginFailureReason,
homeserver: Option<Url>,
},
LoginSecrets(SecretsBundle),
}
experimental-oidc
and crate feature e2e-encryption
and non-WebAssembly only.Expand description
Messages that will be exchanged over the SecureChannel
to log in a new
device using a QR code.
Variants§
LoginProtocols
Message declaring the available protocols for sign in. Sent by the existing device.
Fields
protocols: Vec<LoginProtocolType>
The login protocols the existing device supports.
LoginProtocol
Message declaring which protocols from the previous m.login.protocols
message the new device has picked. Sent by the new device.
Fields
The device authorization grant the OIDC provider has given to the new device, contains the URL the existing device should use to confirm the log in.
protocol: LoginProtocolType
The protocol the new device has picked.
device_id: Curve25519PublicKey
The device ID the new device will be using.
LoginProtocolAccepted
Message declaring that the protocol in the previous m.login.protocol
message was accepted. Sent by the existing device.
LoginSuccess
Message that informs the existing device that it successfully obtained an access token from the OIDC provider. Sent by the new device.
LoginDeclined
Message that informs the existing device that the OIDC provider has declined to give us an access token, i.e. because the user declined the log in. Sent by the new device.
LoginFailure
Message signaling that a failure happened during the login. Can be sent by either device.
Fields
reason: LoginFailureReason
The claimed reason for the login failure.
LoginSecrets(SecretsBundle)
Message containing end-to-end encryption related secrets, the new device can use these secrets to mark itself as verified, connect to a room key backup, and login other devices via a QR login. Sent by the existing device.
Implementations§
Source§impl QrAuthMessage
impl QrAuthMessage
Create a new QrAuthMessage::LoginProtocol
message with the
LoginProtocolType::DeviceAuthorizationGrant
protocol type.
Trait Implementations§
Source§impl Debug for QrAuthMessage
impl Debug for QrAuthMessage
Source§impl<'de> Deserialize<'de> for QrAuthMessage
impl<'de> Deserialize<'de> for QrAuthMessage
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>,
Auto Trait Implementations§
impl Freeze for QrAuthMessage
impl RefUnwindSafe for QrAuthMessage
impl Send for QrAuthMessage
impl Sync for QrAuthMessage
impl Unpin for QrAuthMessage
impl UnwindSafe for QrAuthMessage
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Arc<>
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§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>
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