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§

CheckCodeSender
Used to pass back the checkcode entered by the user to verify that the secure channel is indeed secure.
GrantLoginWithGeneratedQrCode
Named future for granting login by generating a QR code on this, existing, device to be scanned 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 when this device is the one scanning the QR code.
StandardErrorResponse
Error response returned by server after requesting an access token.

Enums§

CheckCodeSenderError
Possible errors when calling CheckCodeSender::send.
ConfigurationError
There was a problem configuring the request.
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.
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.
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.
LoginProtocolType
Enum containing known login protocol types.
LoginQrCodeDecodeError
Error type for the decoding of the QrCodeData.
MessageDecodeError
The error type for the ECIES message decoding failures.
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.
QrCodeMode
The mode of the QR code login.
QrCodeModeData
The mode-specific data for the QR code.
RequestTokenError
Error encountered while requesting access token.
SecureChannelError
Error type for failures in when receiving or sending messages over the secure channel.

Type Aliases§

BasicErrorResponse
Error response specialization for basic OAuth2 implementation.
BasicRequestTokenError
Token error specialization for basic OAuth2 implementation.
DeviceCodeErrorResponse
Error response specialization for device code OAuth2 implementation.