Skip to main content

Module qrcode

Module qrcode 

Source
Available on crate feature e2e-encryption only.
Expand description

Types for the QR code login support defined in MSC4108.

Please note, QR code logins are only supported when using OAuth 2.0 as the authentication mechanism, native Matrix authentication does not support it.

This currently only implements the case where the new device is scanning the QR code. To log in using a QR code, please take a look at the OAuth::login_with_qr_code() method.

Structs§

AuthorizationGrant
Data for the device authorization grant login protocol.
CloneableSender
A oneshot sender we are able to clone so we can put it into a SharedObservable.
ContinuationMessageSender
Struct used to let the QR code granting logic know that it can continue with the process since applications might suspend things while the verification URI is open.
GrantLoginWithGeneratedQrCode
Named future for granting login by generating a QR code on this, existing, device to be scanned by the other, new, device.
GrantLoginWithScannedQrCode
Named future for granting login by scanning a QR code on this, existing, device that was generated by the other, new, device.
LoginWithGeneratedQrCode
Named future for logging in by generating a QR code with the OAuth::login_with_qr_code() method.
LoginWithQrCode
Named future for logging in by scanning a QR code with the OAuth::login_with_qr_code() method.
QrCodeData
Data for the QR code login mechanism.
QrProgress
Metadata to be used with LoginProgress::EstablishingSecureChannel or GrantLoginProgress::EstablishingSecureChannel when this device is the one scanning the QR code.
StandardErrorResponse
Error response returned by server after requesting an access token.
UnknownLoginProtocol
An unknown and unsupported login protocol of a QrAuthMessage::LoginProtocol message.

Enums§

ConfigurationError
There was a problem configuring the request.
DecryptionError
Error type for decryption failures of the secure channel.
DeviceAuthorizationOAuthError
Error type describing failures in the interaction between the device attempting to log in and the OAuth 2.0 authorization server.
DeviceCodeErrorResponseType
Basic access token error types.
EciesError
The Error type for the ECIES submodule.
EciesMessageDecodeError
The error type for the ECIES message decoding failures.
GeneratedQrProgress
Metadata to be used with LoginProgress::EstablishingSecureChannel and GrantLoginProgress::EstablishingSecureChannel when this device is the one generating the QR code.
GrantLoginProgress
The progress of granting the login.
HpkeError
The Error type for the HPKE submodule.
HpkeMessageDecodeError
The error type for the HPKE message decoding failures.
HttpClientError
Error type returned by built-in HTTP clients when requests fail.
LoginFailureReason
Reasons why the login might have failed.
LoginProgress
Type telling us about the progress of the QR code login.
LoginProtocolData
The login protocol the new device has picked in a QrAuthMessage::LoginProtocol message, along with the data specific to that protocol.
LoginProtocolType
Enum containing known login protocol types.
LoginQrCodeDecodeError
Error type for the decoding of the QrCodeData.
MessageDecodeError
Error type which describes failures when messages which are received over the secure channel fail to be decoded.
Msc4108IntentData
The intent-specific data for the QR code.
QRCodeGrantLoginError
The error type for failures while trying to grant log in to a new device using a QR code.
QRCodeLoginError
The error type for failures while trying to log in a new device using a QR code.
QrAuthMessage
Messages that will be exchanged over the SecureChannel to log in a new device using a QR code.
QrCodeIntent
The intent of the device that generated/displayed the QR code.
QrCodeIntentData
Intent-specific data of the QrCodeData.
RequestTokenError
Error encountered while requesting access token.
SecureChannelError
Error type for failures in when receiving or sending messages over the secure channel.
SenderError
Possible errors when calling CloneableSender::send.

Type Aliases§

BasicErrorResponse
Error response specialization for basic OAuth2 implementation.
BasicRequestTokenError
Token error specialization for basic OAuth2 implementation.
CheckCodeSender
A oneshot sender used to send the check code back to the device that generated the QR code.
DeviceCodeErrorResponse
Error response specialization for device code OAuth2 implementation.