Skip to main content

Module test_login

Module test_login 

Source
Expand description

Insecure registration and login endpoints for testing with Complement and friends.

Structsยง

TestLoginComponent
Component for insecure login endpoint

Enumsยง

GetUsernameAvailabilityError ๐Ÿ”’
Error type for get_username_availability_handler
LoginError ๐Ÿ”’
RegisterResponse ๐Ÿ”’
A response to a registration - either the registration is successful, or we still require user-interactive authentication.

Functionsยง

create_session ๐Ÿ”’
Create a session, optionally with a user-provided device ID.
get_login_types_handler ๐Ÿ”’
Handler for GET /_matrix/client/v3/login (See https://spec.matrix.org/latest/client-server-api/#get_matrixclientv3login).
get_username_availability_handler ๐Ÿ”’
Handler for GET /_matrix/client/v3/register/available (See https://spec.matrix.org/latest/client-server-api/#get_matrixclientv3registeravailable).
login_handler ๐Ÿ”’
Handler for POST /_matrix/client/v3/login (See https://spec.matrix.org/latest/client-server-api/#post_matrixclientv3login).
register_handler ๐Ÿ”’
Handler for POST /_matrix/client/v3/register (See https://spec.matrix.org/latest/client-server-api/#post_matrixclientv3register).
try_generate_device_id ๐Ÿ”’
Tries at most 3 times to generate a new [DeviceId] that does not conflict with the given forbidden_ids.