async-matrix 0.1.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +131 -0
- data/data/matrix-spec/api/client-server/account-data.yaml +389 -0
- data/data/matrix-spec/api/client-server/account_deactivation.yaml +149 -0
- data/data/matrix-spec/api/client-server/admin.yaml +512 -0
- data/data/matrix-spec/api/client-server/administrative_contact.yaml +620 -0
- data/data/matrix-spec/api/client-server/appservice_ping.yaml +183 -0
- data/data/matrix-spec/api/client-server/appservice_room_directory.yaml +104 -0
- data/data/matrix-spec/api/client-server/authed-content-repo.yaml +590 -0
- data/data/matrix-spec/api/client-server/banning.yaml +177 -0
- data/data/matrix-spec/api/client-server/capabilities.yaml +235 -0
- data/data/matrix-spec/api/client-server/content-repo.yaml +887 -0
- data/data/matrix-spec/api/client-server/create_room.yaml +306 -0
- data/data/matrix-spec/api/client-server/cross_signing.yaml +300 -0
- data/data/matrix-spec/api/client-server/definitions/auth_data.yaml +34 -0
- data/data/matrix-spec/api/client-server/definitions/auth_response.yaml +62 -0
- data/data/matrix-spec/api/client-server/definitions/client_device.yaml +44 -0
- data/data/matrix-spec/api/client-server/definitions/client_event.yaml +49 -0
- data/data/matrix-spec/api/client-server/definitions/client_event_without_room_id.yaml +147 -0
- data/data/matrix-spec/api/client-server/definitions/cross_signing_key.yaml +57 -0
- data/data/matrix-spec/api/client-server/definitions/device_keys.yaml +70 -0
- data/data/matrix-spec/api/client-server/definitions/errors/error.yaml +26 -0
- data/data/matrix-spec/api/client-server/definitions/errors/rate_limited.yaml +34 -0
- data/data/matrix-spec/api/client-server/definitions/event_batch.yaml +22 -0
- data/data/matrix-spec/api/client-server/definitions/event_filter.yaml +55 -0
- data/data/matrix-spec/api/client-server/definitions/invite_3pid.yaml +45 -0
- data/data/matrix-spec/api/client-server/definitions/key_backup_auth_data.yaml +36 -0
- data/data/matrix-spec/api/client-server/definitions/key_backup_data.yaml +50 -0
- data/data/matrix-spec/api/client-server/definitions/key_backup_session_data.yaml +57 -0
- data/data/matrix-spec/api/client-server/definitions/m.login.terms_params.yaml +83 -0
- data/data/matrix-spec/api/client-server/definitions/m.mentions.yaml +33 -0
- data/data/matrix-spec/api/client-server/definitions/m.oauth_params.yaml +30 -0
- data/data/matrix-spec/api/client-server/definitions/m.relates_to.yaml +45 -0
- data/data/matrix-spec/api/client-server/definitions/megolm_export_session_data.yaml +39 -0
- data/data/matrix-spec/api/client-server/definitions/olm_payload.yaml +88 -0
- data/data/matrix-spec/api/client-server/definitions/one_time_keys.yaml +27 -0
- data/data/matrix-spec/api/client-server/definitions/openid_token.yaml +37 -0
- data/data/matrix-spec/api/client-server/definitions/protocol.yaml +44 -0
- data/data/matrix-spec/api/client-server/definitions/public_rooms_chunk.yaml +74 -0
- data/data/matrix-spec/api/client-server/definitions/public_rooms_response.yaml +59 -0
- data/data/matrix-spec/api/client-server/definitions/push_condition.yaml +53 -0
- data/data/matrix-spec/api/client-server/definitions/push_rule.yaml +53 -0
- data/data/matrix-spec/api/client-server/definitions/push_ruleset.yaml +206 -0
- data/data/matrix-spec/api/client-server/definitions/recent_emoji.yaml +29 -0
- data/data/matrix-spec/api/client-server/definitions/request_email_validation.yaml +36 -0
- data/data/matrix-spec/api/client-server/definitions/request_msisdn_validation.yaml +36 -0
- data/data/matrix-spec/api/client-server/definitions/request_token_response.yaml +46 -0
- data/data/matrix-spec/api/client-server/definitions/room_event_filter.yaml +60 -0
- data/data/matrix-spec/api/client-server/definitions/room_key_backup.yaml +37 -0
- data/data/matrix-spec/api/client-server/definitions/room_summary.yaml +44 -0
- data/data/matrix-spec/api/client-server/definitions/security.yaml +47 -0
- data/data/matrix-spec/api/client-server/definitions/sso_login_flow.yaml +98 -0
- data/data/matrix-spec/api/client-server/definitions/state_event_batch.yaml +21 -0
- data/data/matrix-spec/api/client-server/definitions/sync_filter.yaml +86 -0
- data/data/matrix-spec/api/client-server/definitions/tag.yaml +24 -0
- data/data/matrix-spec/api/client-server/definitions/third_party_signed.yaml +45 -0
- data/data/matrix-spec/api/client-server/definitions/timeline_batch.yaml +36 -0
- data/data/matrix-spec/api/client-server/definitions/user_identifier.yaml +27 -0
- data/data/matrix-spec/api/client-server/definitions/wellknown/full.yaml +38 -0
- data/data/matrix-spec/api/client-server/definitions/wellknown/homeserver.yaml +25 -0
- data/data/matrix-spec/api/client-server/definitions/wellknown/identity_server.yaml +25 -0
- data/data/matrix-spec/api/client-server/device_management.yaml +314 -0
- data/data/matrix-spec/api/client-server/directory.yaml +318 -0
- data/data/matrix-spec/api/client-server/event_context.yaml +161 -0
- data/data/matrix-spec/api/client-server/filter.yaml +224 -0
- data/data/matrix-spec/api/client-server/inviting.yaml +149 -0
- data/data/matrix-spec/api/client-server/joining.yaml +238 -0
- data/data/matrix-spec/api/client-server/key_backup.yaml +993 -0
- data/data/matrix-spec/api/client-server/keys.yaml +482 -0
- data/data/matrix-spec/api/client-server/kicking.yaml +110 -0
- data/data/matrix-spec/api/client-server/knocking.yaml +152 -0
- data/data/matrix-spec/api/client-server/leaving.yaml +163 -0
- data/data/matrix-spec/api/client-server/list_joined_rooms.yaml +68 -0
- data/data/matrix-spec/api/client-server/list_public_rooms.yaml +280 -0
- data/data/matrix-spec/api/client-server/login.yaml +321 -0
- data/data/matrix-spec/api/client-server/login_token.yaml +138 -0
- data/data/matrix-spec/api/client-server/logout.yaml +86 -0
- data/data/matrix-spec/api/client-server/message_pagination.yaml +194 -0
- data/data/matrix-spec/api/client-server/notifications.yaml +152 -0
- data/data/matrix-spec/api/client-server/oauth_server_metadata.yaml +238 -0
- data/data/matrix-spec/api/client-server/old_sync.yaml +379 -0
- data/data/matrix-spec/api/client-server/openid.yaml +98 -0
- data/data/matrix-spec/api/client-server/password_management.yaml +246 -0
- data/data/matrix-spec/api/client-server/peeking_events.yaml +122 -0
- data/data/matrix-spec/api/client-server/policy_server.yaml +82 -0
- data/data/matrix-spec/api/client-server/presence.yaml +169 -0
- data/data/matrix-spec/api/client-server/profile.yaml +366 -0
- data/data/matrix-spec/api/client-server/pusher.yaml +303 -0
- data/data/matrix-spec/api/client-server/pushrules.yaml +633 -0
- data/data/matrix-spec/api/client-server/read_markers.yaml +103 -0
- data/data/matrix-spec/api/client-server/receipts.yaml +139 -0
- data/data/matrix-spec/api/client-server/redaction.yaml +116 -0
- data/data/matrix-spec/api/client-server/refresh.yaml +119 -0
- data/data/matrix-spec/api/client-server/registration.yaml +488 -0
- data/data/matrix-spec/api/client-server/registration_tokens.yaml +93 -0
- data/data/matrix-spec/api/client-server/relations.yaml +382 -0
- data/data/matrix-spec/api/client-server/report_content.yaml +283 -0
- data/data/matrix-spec/api/client-server/room_event_by_timestamp.yaml +147 -0
- data/data/matrix-spec/api/client-server/room_initial_sync.yaml +188 -0
- data/data/matrix-spec/api/client-server/room_send.yaml +130 -0
- data/data/matrix-spec/api/client-server/room_state.yaml +159 -0
- data/data/matrix-spec/api/client-server/room_summary.yaml +138 -0
- data/data/matrix-spec/api/client-server/room_upgrades.yaml +130 -0
- data/data/matrix-spec/api/client-server/rooms.yaml +380 -0
- data/data/matrix-spec/api/client-server/search.yaml +385 -0
- data/data/matrix-spec/api/client-server/space_hierarchy.yaml +237 -0
- data/data/matrix-spec/api/client-server/sso_login_redirect.yaml +135 -0
- data/data/matrix-spec/api/client-server/support.yaml +142 -0
- data/data/matrix-spec/api/client-server/sync.yaml +692 -0
- data/data/matrix-spec/api/client-server/tags.yaml +183 -0
- data/data/matrix-spec/api/client-server/third_party_lookup.yaml +324 -0
- data/data/matrix-spec/api/client-server/third_party_membership.yaml +139 -0
- data/data/matrix-spec/api/client-server/threads_list.yaml +167 -0
- data/data/matrix-spec/api/client-server/to_device.yaml +104 -0
- data/data/matrix-spec/api/client-server/typing.yaml +103 -0
- data/data/matrix-spec/api/client-server/users.yaml +136 -0
- data/data/matrix-spec/api/client-server/versions.yaml +108 -0
- data/data/matrix-spec/api/client-server/voip.yaml +93 -0
- data/data/matrix-spec/api/client-server/wellknown.yaml +60 -0
- data/data/matrix-spec/api/client-server/whoami.yaml +121 -0
- data/data/matrix-spec/event-schemas/examples/core/event.json +6 -0
- data/data/matrix-spec/event-schemas/examples/core/room_edu.json +3 -0
- data/data/matrix-spec/event-schemas/examples/core/room_event.json +11 -0
- data/data/matrix-spec/event-schemas/examples/core/state_event.json +4 -0
- data/data/matrix-spec/event-schemas/examples/invite_room_state.json +18 -0
- data/data/matrix-spec/event-schemas/examples/knock_room_state.json +18 -0
- data/data/matrix-spec/event-schemas/examples/m.accepted_terms.yaml +10 -0
- data/data/matrix-spec/event-schemas/examples/m.call.answer.yaml +21 -0
- data/data/matrix-spec/event-schemas/examples/m.call.candidates.yaml +16 -0
- data/data/matrix-spec/event-schemas/examples/m.call.hangup.yaml +10 -0
- data/data/matrix-spec/event-schemas/examples/m.call.invite.yaml +22 -0
- data/data/matrix-spec/event-schemas/examples/m.call.negotiate.yaml +22 -0
- data/data/matrix-spec/event-schemas/examples/m.call.reject.yaml +9 -0
- data/data/matrix-spec/event-schemas/examples/m.call.sdp_stream_metadata_changed.yaml +16 -0
- data/data/matrix-spec/event-schemas/examples/m.call.select_answer.yaml +10 -0
- data/data/matrix-spec/event-schemas/examples/m.direct.yaml +10 -0
- data/data/matrix-spec/event-schemas/examples/m.dummy.yaml +4 -0
- data/data/matrix-spec/event-schemas/examples/m.forwarded_room_key.yaml +14 -0
- data/data/matrix-spec/event-schemas/examples/m.fully_read.yaml +7 -0
- data/data/matrix-spec/event-schemas/examples/m.identity_server.yaml +7 -0
- data/data/matrix-spec/event-schemas/examples/m.ignored_user_list.yaml +9 -0
- data/data/matrix-spec/event-schemas/examples/m.invite_permission_config.yaml +7 -0
- data/data/matrix-spec/event-schemas/examples/m.key.verification.accept.yaml +12 -0
- data/data/matrix-spec/event-schemas/examples/m.key.verification.cancel.yaml +8 -0
- data/data/matrix-spec/event-schemas/examples/m.key.verification.done.yaml +6 -0
- data/data/matrix-spec/event-schemas/examples/m.key.verification.key.yaml +7 -0
- data/data/matrix-spec/event-schemas/examples/m.key.verification.mac.yaml +10 -0
- data/data/matrix-spec/event-schemas/examples/m.key.verification.ready.yaml +10 -0
- data/data/matrix-spec/event-schemas/examples/m.key.verification.request.yaml +11 -0
- data/data/matrix-spec/event-schemas/examples/m.key.verification.start$m.sas.v1.yaml +12 -0
- data/data/matrix-spec/event-schemas/examples/m.key.verification.start.yaml +8 -0
- data/data/matrix-spec/event-schemas/examples/m.key_backup.yaml +7 -0
- data/data/matrix-spec/event-schemas/examples/m.marked_unread.yaml +7 -0
- data/data/matrix-spec/event-schemas/examples/m.policy.rule.room.yaml +10 -0
- data/data/matrix-spec/event-schemas/examples/m.policy.rule.server.yaml +10 -0
- data/data/matrix-spec/event-schemas/examples/m.policy.rule.user.yaml +10 -0
- data/data/matrix-spec/event-schemas/examples/m.presence.yaml +12 -0
- data/data/matrix-spec/event-schemas/examples/m.push_rules.yaml +177 -0
- data/data/matrix-spec/event-schemas/examples/m.reaction.yaml +11 -0
- data/data/matrix-spec/event-schemas/examples/m.receipt.yaml +18 -0
- data/data/matrix-spec/event-schemas/examples/m.recent_emoji.yaml +16 -0
- data/data/matrix-spec/event-schemas/examples/m.room.avatar.yaml +14 -0
- data/data/matrix-spec/event-schemas/examples/m.room.canonical_alias.yaml +12 -0
- data/data/matrix-spec/event-schemas/examples/m.room.create.yaml +13 -0
- data/data/matrix-spec/event-schemas/examples/m.room.encrypted$megolm.yaml +11 -0
- data/data/matrix-spec/event-schemas/examples/m.room.encrypted$olm.yaml +14 -0
- data/data/matrix-spec/event-schemas/examples/m.room.encryption.yaml +10 -0
- data/data/matrix-spec/event-schemas/examples/m.room.guest_access.yaml +8 -0
- data/data/matrix-spec/event-schemas/examples/m.room.history_visibility.yaml +8 -0
- data/data/matrix-spec/event-schemas/examples/m.room.join_rules$restricted.yaml +18 -0
- data/data/matrix-spec/event-schemas/examples/m.room.join_rules.yaml +8 -0
- data/data/matrix-spec/event-schemas/examples/m.room.member$invite_room_state.yaml +15 -0
- data/data/matrix-spec/event-schemas/examples/m.room.member$join_authorised_via_users_server.yaml +12 -0
- data/data/matrix-spec/event-schemas/examples/m.room.member$knock_room_state.yaml +15 -0
- data/data/matrix-spec/event-schemas/examples/m.room.member$third_party_invite.yaml +20 -0
- data/data/matrix-spec/event-schemas/examples/m.room.member.yaml +12 -0
- data/data/matrix-spec/event-schemas/examples/m.room.message$m.audio.yaml +14 -0
- data/data/matrix-spec/event-schemas/examples/m.room.message$m.emote.yaml +10 -0
- data/data/matrix-spec/event-schemas/examples/m.room.message$m.file.yaml +14 -0
- data/data/matrix-spec/event-schemas/examples/m.room.message$m.image.yaml +16 -0
- data/data/matrix-spec/event-schemas/examples/m.room.message$m.key.verification.request.yaml +19 -0
- data/data/matrix-spec/event-schemas/examples/m.room.message$m.location.yaml +18 -0
- data/data/matrix-spec/event-schemas/examples/m.room.message$m.notice.yaml +10 -0
- data/data/matrix-spec/event-schemas/examples/m.room.message$m.server_notice.yaml +11 -0
- data/data/matrix-spec/event-schemas/examples/m.room.message$m.text.yaml +10 -0
- data/data/matrix-spec/event-schemas/examples/m.room.message$m.video.yaml +23 -0
- data/data/matrix-spec/event-schemas/examples/m.room.name.yaml +8 -0
- data/data/matrix-spec/event-schemas/examples/m.room.pinned_events.yaml +8 -0
- data/data/matrix-spec/event-schemas/examples/m.room.policy.yaml +11 -0
- data/data/matrix-spec/event-schemas/examples/m.room.power_levels.yaml +24 -0
- data/data/matrix-spec/event-schemas/examples/m.room.redaction.yaml +8 -0
- data/data/matrix-spec/event-schemas/examples/m.room.server_acl.yaml +10 -0
- data/data/matrix-spec/event-schemas/examples/m.room.third_party_invite.yaml +14 -0
- data/data/matrix-spec/event-schemas/examples/m.room.tombstone.yaml +9 -0
- data/data/matrix-spec/event-schemas/examples/m.room.topic.yaml +16 -0
- data/data/matrix-spec/event-schemas/examples/m.room_key.withheld.yaml +12 -0
- data/data/matrix-spec/event-schemas/examples/m.room_key.yaml +10 -0
- data/data/matrix-spec/event-schemas/examples/m.room_key_request$cancel_request.yaml +8 -0
- data/data/matrix-spec/event-schemas/examples/m.room_key_request$request.yaml +14 -0
- data/data/matrix-spec/event-schemas/examples/m.secret.request.yaml +9 -0
- data/data/matrix-spec/event-schemas/examples/m.secret.send.yaml +7 -0
- data/data/matrix-spec/event-schemas/examples/m.space.child.yaml +10 -0
- data/data/matrix-spec/event-schemas/examples/m.space.parent.yaml +9 -0
- data/data/matrix-spec/event-schemas/examples/m.sticker.yaml +22 -0
- data/data/matrix-spec/event-schemas/examples/m.tag.yaml +9 -0
- data/data/matrix-spec/event-schemas/examples/m.typing.yaml +7 -0
- data/data/matrix-spec/event-schemas/moderation_policy_rule.yaml +32 -0
- data/data/matrix-spec/event-schemas/schema/components/m_text_content_block.yaml +28 -0
- data/data/matrix-spec/event-schemas/schema/components/sdp_stream_metadata.yaml +43 -0
- data/data/matrix-spec/event-schemas/schema/components/signed_third_party_invite.yaml +48 -0
- data/data/matrix-spec/event-schemas/schema/core-event-schema/call_event.yaml +27 -0
- data/data/matrix-spec/event-schemas/schema/core-event-schema/event.yaml +16 -0
- data/data/matrix-spec/event-schemas/schema/core-event-schema/msgtype_infos/avatar_info.yaml +30 -0
- data/data/matrix-spec/event-schemas/schema/core-event-schema/msgtype_infos/image_info.yaml +52 -0
- data/data/matrix-spec/event-schemas/schema/core-event-schema/msgtype_infos/thumbnail_info.yaml +22 -0
- data/data/matrix-spec/event-schemas/schema/core-event-schema/room_event.yaml +17 -0
- data/data/matrix-spec/event-schemas/schema/core-event-schema/state_event.yaml +8 -0
- data/data/matrix-spec/event-schemas/schema/core-event-schema/stripped_state.yaml +48 -0
- data/data/matrix-spec/event-schemas/schema/core-event-schema/sync_room_event.yaml +49 -0
- data/data/matrix-spec/event-schemas/schema/core-event-schema/sync_state_event.yaml +36 -0
- data/data/matrix-spec/event-schemas/schema/core-event-schema/unsigned_prop.yaml +23 -0
- data/data/matrix-spec/event-schemas/schema/m.accepted_terms.yaml +25 -0
- data/data/matrix-spec/event-schemas/schema/m.call.answer.yaml +44 -0
- data/data/matrix-spec/event-schemas/schema/m.call.candidates.yaml +52 -0
- data/data/matrix-spec/event-schemas/schema/m.call.hangup.yaml +57 -0
- data/data/matrix-spec/event-schemas/schema/m.call.invite.yaml +53 -0
- data/data/matrix-spec/event-schemas/schema/m.call.negotiate.yaml +78 -0
- data/data/matrix-spec/event-schemas/schema/m.call.reject.yaml +29 -0
- data/data/matrix-spec/event-schemas/schema/m.call.sdp_stream_metadata_changed.yaml +24 -0
- data/data/matrix-spec/event-schemas/schema/m.call.select_answer.yaml +29 -0
- data/data/matrix-spec/event-schemas/schema/m.direct.yaml +29 -0
- data/data/matrix-spec/event-schemas/schema/m.dummy.yaml +25 -0
- data/data/matrix-spec/event-schemas/schema/m.forwarded_room_key.yaml +70 -0
- data/data/matrix-spec/event-schemas/schema/m.fully_read.yaml +26 -0
- data/data/matrix-spec/event-schemas/schema/m.identity_server.yaml +28 -0
- data/data/matrix-spec/event-schemas/schema/m.ignored_user_list.yaml +30 -0
- data/data/matrix-spec/event-schemas/schema/m.invite_permission_config.yaml +21 -0
- data/data/matrix-spec/event-schemas/schema/m.key.verification.accept.yaml +63 -0
- data/data/matrix-spec/event-schemas/schema/m.key.verification.cancel.yaml +72 -0
- data/data/matrix-spec/event-schemas/schema/m.key.verification.done.yaml +24 -0
- data/data/matrix-spec/event-schemas/schema/m.key.verification.key.yaml +31 -0
- data/data/matrix-spec/event-schemas/schema/m.key.verification.m.relates_to.yaml +23 -0
- data/data/matrix-spec/event-schemas/schema/m.key.verification.mac.yaml +43 -0
- data/data/matrix-spec/event-schemas/schema/m.key.verification.ready.yaml +41 -0
- data/data/matrix-spec/event-schemas/schema/m.key.verification.request.yaml +47 -0
- data/data/matrix-spec/event-schemas/schema/m.key.verification.start$m.reciprocate.v1.yaml +45 -0
- data/data/matrix-spec/event-schemas/schema/m.key.verification.start$m.sas.v1.yaml +76 -0
- data/data/matrix-spec/event-schemas/schema/m.key.verification.start.yaml +46 -0
- data/data/matrix-spec/event-schemas/schema/m.key_backup.yaml +24 -0
- data/data/matrix-spec/event-schemas/schema/m.marked_unread.yaml +26 -0
- data/data/matrix-spec/event-schemas/schema/m.policy.rule.room.yaml +17 -0
- data/data/matrix-spec/event-schemas/schema/m.policy.rule.server.yaml +17 -0
- data/data/matrix-spec/event-schemas/schema/m.policy.rule.user.yaml +17 -0
- data/data/matrix-spec/event-schemas/schema/m.presence.yaml +50 -0
- data/data/matrix-spec/event-schemas/schema/m.push_rules.yaml +23 -0
- data/data/matrix-spec/event-schemas/schema/m.reaction.yaml +45 -0
- data/data/matrix-spec/event-schemas/schema/m.receipt.yaml +65 -0
- data/data/matrix-spec/event-schemas/schema/m.recent_emoji.yaml +29 -0
- data/data/matrix-spec/event-schemas/schema/m.room.avatar.yaml +29 -0
- data/data/matrix-spec/event-schemas/schema/m.room.canonical_alias.yaml +40 -0
- data/data/matrix-spec/event-schemas/schema/m.room.create.yaml +86 -0
- data/data/matrix-spec/event-schemas/schema/m.room.encrypted.yaml +91 -0
- data/data/matrix-spec/event-schemas/schema/m.room.encryption.yaml +38 -0
- data/data/matrix-spec/event-schemas/schema/m.room.guest_access.yaml +28 -0
- data/data/matrix-spec/event-schemas/schema/m.room.history_visibility.yaml +30 -0
- data/data/matrix-spec/event-schemas/schema/m.room.join_rules.yaml +78 -0
- data/data/matrix-spec/event-schemas/schema/m.room.member.yaml +174 -0
- data/data/matrix-spec/event-schemas/schema/m.room.message$m.audio.yaml +73 -0
- data/data/matrix-spec/event-schemas/schema/m.room.message$m.emote.yaml +36 -0
- data/data/matrix-spec/event-schemas/schema/m.room.message$m.file.yaml +85 -0
- data/data/matrix-spec/event-schemas/schema/m.room.message$m.image.yaml +63 -0
- data/data/matrix-spec/event-schemas/schema/m.room.message$m.key.verification.request.yaml +70 -0
- data/data/matrix-spec/event-schemas/schema/m.room.message$m.location.yaml +50 -0
- data/data/matrix-spec/event-schemas/schema/m.room.message$m.notice.yaml +36 -0
- data/data/matrix-spec/event-schemas/schema/m.room.message$m.server_notice.yaml +41 -0
- data/data/matrix-spec/event-schemas/schema/m.room.message$m.text.yaml +36 -0
- data/data/matrix-spec/event-schemas/schema/m.room.message$m.video.yaml +95 -0
- data/data/matrix-spec/event-schemas/schema/m.room.message.yaml +25 -0
- data/data/matrix-spec/event-schemas/schema/m.room.name.yaml +35 -0
- data/data/matrix-spec/event-schemas/schema/m.room.pinned_events.yaml +27 -0
- data/data/matrix-spec/event-schemas/schema/m.room.policy.yaml +41 -0
- data/data/matrix-spec/event-schemas/schema/m.room.power_levels.yaml +139 -0
- data/data/matrix-spec/event-schemas/schema/m.room.redaction.yaml +29 -0
- data/data/matrix-spec/event-schemas/schema/m.room.server_acl.yaml +88 -0
- data/data/matrix-spec/event-schemas/schema/m.room.third_party_invite.yaml +79 -0
- data/data/matrix-spec/event-schemas/schema/m.room.tombstone.yaml +29 -0
- data/data/matrix-spec/event-schemas/schema/m.room.topic.yaml +53 -0
- data/data/matrix-spec/event-schemas/schema/m.room_key.withheld.yaml +88 -0
- data/data/matrix-spec/event-schemas/schema/m.room_key.yaml +38 -0
- data/data/matrix-spec/event-schemas/schema/m.room_key_request.yaml +73 -0
- data/data/matrix-spec/event-schemas/schema/m.secret.request.yaml +42 -0
- data/data/matrix-spec/event-schemas/schema/m.secret.send.yaml +35 -0
- data/data/matrix-spec/event-schemas/schema/m.space.child.yaml +50 -0
- data/data/matrix-spec/event-schemas/schema/m.space.parent.yaml +36 -0
- data/data/matrix-spec/event-schemas/schema/m.sticker.yaml +36 -0
- data/data/matrix-spec/event-schemas/schema/m.tag.yaml +28 -0
- data/data/matrix-spec/event-schemas/schema/m.typing.yaml +29 -0
- data/lib/async/matrix/api/chain.rb +575 -0
- data/lib/async/matrix/api/concat.rb +105 -0
- data/lib/async/matrix/api/path_tree.rb +208 -0
- data/lib/async/matrix/api.rb +204 -0
- data/lib/async/matrix/application_service/bot.rb +235 -0
- data/lib/async/matrix/application_service/config/schema/analytics.json +21 -0
- data/lib/async/matrix/application_service/config/schema/appservice.json +82 -0
- data/lib/async/matrix/application_service/config/schema/backfill.json +91 -0
- data/lib/async/matrix/application_service/config/schema/bridge.json +209 -0
- data/lib/async/matrix/application_service/config/schema/config.json +61 -0
- data/lib/async/matrix/application_service/config/schema/database.json +38 -0
- data/lib/async/matrix/application_service/config/schema/direct_media.json +35 -0
- data/lib/async/matrix/application_service/config/schema/double_puppet.json +24 -0
- data/lib/async/matrix/application_service/config/schema/encryption.json +164 -0
- data/lib/async/matrix/application_service/config/schema/homeserver.json +58 -0
- data/lib/async/matrix/application_service/config/schema/logging.json +50 -0
- data/lib/async/matrix/application_service/config/schema/management_room_texts.json +25 -0
- data/lib/async/matrix/application_service/config/schema/matrix.json +45 -0
- data/lib/async/matrix/application_service/config/schema/permissions.json +54 -0
- data/lib/async/matrix/application_service/config/schema/provisioning.json +23 -0
- data/lib/async/matrix/application_service/config/schema/public_media.json +39 -0
- data/lib/async/matrix/application_service/config/schema/relay.json +43 -0
- data/lib/async/matrix/application_service/config/vivify.rb +110 -0
- data/lib/async/matrix/application_service/config.rb +214 -123
- data/lib/async/matrix/application_service/dispatcher.rb +115 -113
- data/lib/async/matrix/application_service/error_response.rb +26 -26
- data/lib/async/matrix/application_service/event.rb +217 -1
- data/lib/async/matrix/application_service/server.rb +286 -215
- data/lib/async/matrix/application_service/transaction.rb +52 -52
- data/lib/async/matrix/application_service/transaction_store.rb +62 -62
- data/lib/async/matrix/client.rb +919 -179
- data/lib/async/matrix/connection.rb +8 -8
- data/lib/async/matrix/endpoint.rb +45 -45
- data/lib/async/matrix/error.rb +49 -43
- data/lib/async/matrix/media_client.rb +173 -0
- data/lib/async/matrix/notifier.rb +92 -92
- data/lib/async/matrix/schema/registry.rb +355 -0
- data/lib/async/matrix/schema/validation_error.rb +226 -0
- data/lib/async/matrix/schema.rb +174 -0
- data/lib/async/matrix/server.rb +7 -7
- data/lib/async/matrix/stream.rb +7 -7
- data/lib/async/matrix/version.rb +1 -1
- data/lib/async/matrix.rb +5 -2
- metadata +353 -1
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
# Copyright 2016 OpenMarket Ltd
|
|
2
|
+
# Copyright 2018 New Vector Ltd
|
|
3
|
+
# Copyright 2022 The Matrix.org Foundation C.I.C.
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
openapi: 3.1.0
|
|
17
|
+
info:
|
|
18
|
+
title: Matrix Client-Server Registration and Login API
|
|
19
|
+
version: 1.0.0
|
|
20
|
+
paths:
|
|
21
|
+
/login:
|
|
22
|
+
get:
|
|
23
|
+
summary: Get the supported login types to authenticate users
|
|
24
|
+
description: |-
|
|
25
|
+
Gets the homeserver's supported login types to authenticate users. Clients
|
|
26
|
+
should pick one of these and supply it as the `type` when logging in.
|
|
27
|
+
operationId: getLoginFlows
|
|
28
|
+
responses:
|
|
29
|
+
"200":
|
|
30
|
+
description: The login types the homeserver supports
|
|
31
|
+
content:
|
|
32
|
+
application/json:
|
|
33
|
+
schema:
|
|
34
|
+
type: object
|
|
35
|
+
properties:
|
|
36
|
+
flows:
|
|
37
|
+
type: array
|
|
38
|
+
description: The homeserver's supported login types
|
|
39
|
+
items:
|
|
40
|
+
type: object
|
|
41
|
+
title: LoginFlow
|
|
42
|
+
required:
|
|
43
|
+
- type
|
|
44
|
+
properties:
|
|
45
|
+
type:
|
|
46
|
+
description: |-
|
|
47
|
+
The login type. This is supplied as the `type` when
|
|
48
|
+
logging in.
|
|
49
|
+
type: string
|
|
50
|
+
get_login_token:
|
|
51
|
+
type: boolean
|
|
52
|
+
x-addedInMatrixVersion: "1.7"
|
|
53
|
+
description: |-
|
|
54
|
+
If `type` is `m.login.token`, an optional field to indicate
|
|
55
|
+
to the unauthenticated client that the homeserver supports
|
|
56
|
+
the [`POST /login/get_token`](/client-server-api/#post_matrixclientv1loginget_token)
|
|
57
|
+
endpoint. Note that supporting the endpoint does not
|
|
58
|
+
necessarily indicate that the user attempting to log in will
|
|
59
|
+
be able to generate such a token.
|
|
60
|
+
examples:
|
|
61
|
+
response:
|
|
62
|
+
value: {
|
|
63
|
+
"flows": [
|
|
64
|
+
{
|
|
65
|
+
"type": "m.login.password"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"type": "m.login.token",
|
|
69
|
+
"get_login_token": true
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
"404":
|
|
74
|
+
description: |-
|
|
75
|
+
With `M_UNRECOGNIZED`: the homeserver does not support the legacy authentication API.
|
|
76
|
+
(See [Authentication API discovery](/client-server-api/#authentication-api-discovery).)
|
|
77
|
+
content:
|
|
78
|
+
application/json:
|
|
79
|
+
schema:
|
|
80
|
+
$ref: definitions/errors/error.yaml
|
|
81
|
+
examples:
|
|
82
|
+
response:
|
|
83
|
+
value:
|
|
84
|
+
{
|
|
85
|
+
"errcode": "M_UNRECOGNIZED",
|
|
86
|
+
"error": "OAuth 2.0 authentication is in use on this homeserver.",
|
|
87
|
+
}
|
|
88
|
+
"429":
|
|
89
|
+
description: This request was rate-limited.
|
|
90
|
+
content:
|
|
91
|
+
application/json:
|
|
92
|
+
schema:
|
|
93
|
+
$ref: definitions/errors/rate_limited.yaml
|
|
94
|
+
tags:
|
|
95
|
+
- Session management
|
|
96
|
+
post:
|
|
97
|
+
summary: Authenticates the user.
|
|
98
|
+
description: |-
|
|
99
|
+
Authenticates the user, and issues an access token they can
|
|
100
|
+
use to authorize themself in subsequent requests.
|
|
101
|
+
|
|
102
|
+
If the client does not supply a `device_id`, the server must
|
|
103
|
+
auto-generate one.
|
|
104
|
+
|
|
105
|
+
The returned access token must be associated with the `device_id`
|
|
106
|
+
supplied by the client or generated by the server. The server may
|
|
107
|
+
invalidate any access token previously associated with that device. See
|
|
108
|
+
[Relationship between access tokens and devices](/client-server-api/#relationship-between-access-tokens-and-devices).
|
|
109
|
+
operationId: login
|
|
110
|
+
requestBody:
|
|
111
|
+
content:
|
|
112
|
+
application/json:
|
|
113
|
+
schema:
|
|
114
|
+
type: object
|
|
115
|
+
example: {
|
|
116
|
+
"type": "m.login.password",
|
|
117
|
+
"identifier": {
|
|
118
|
+
"type": "m.id.user",
|
|
119
|
+
"user": "cheeky_monkey"
|
|
120
|
+
},
|
|
121
|
+
"password": "ilovebananas",
|
|
122
|
+
"initial_device_display_name": "Jungle Phone"
|
|
123
|
+
}
|
|
124
|
+
properties:
|
|
125
|
+
type:
|
|
126
|
+
type: string
|
|
127
|
+
description: |-
|
|
128
|
+
The login type being used.
|
|
129
|
+
|
|
130
|
+
This must be a type returned in one of the flows of the
|
|
131
|
+
response of the [`GET /login`](/client-server-api/#get_matrixclientv3login)
|
|
132
|
+
endpoint, like `m.login.password` or `m.login.token`.
|
|
133
|
+
identifier:
|
|
134
|
+
$ref: definitions/user_identifier.yaml
|
|
135
|
+
user:
|
|
136
|
+
type: string
|
|
137
|
+
deprecated: true
|
|
138
|
+
description: The fully qualified user ID or just local part of the user ID, to
|
|
139
|
+
log in. Deprecated in favour of `identifier`.
|
|
140
|
+
medium:
|
|
141
|
+
type: string
|
|
142
|
+
deprecated: true
|
|
143
|
+
description: When logging in using a third-party identifier, the medium of the
|
|
144
|
+
identifier. Must be 'email'. Deprecated in favour of
|
|
145
|
+
`identifier`.
|
|
146
|
+
address:
|
|
147
|
+
type: string
|
|
148
|
+
deprecated: true
|
|
149
|
+
description: Third-party identifier for the user. Deprecated in favour of
|
|
150
|
+
`identifier`.
|
|
151
|
+
password:
|
|
152
|
+
type: string
|
|
153
|
+
description: |-
|
|
154
|
+
Required when `type` is `m.login.password`. The user's
|
|
155
|
+
password.
|
|
156
|
+
token:
|
|
157
|
+
type: string
|
|
158
|
+
description: Required when `type` is `m.login.token`. Part of Token-based login.
|
|
159
|
+
device_id:
|
|
160
|
+
type: string
|
|
161
|
+
description: |-
|
|
162
|
+
ID of the client device. If this does not correspond to a
|
|
163
|
+
known client device, a new device will be created. The given
|
|
164
|
+
device ID must not be the same as a
|
|
165
|
+
[cross-signing](/client-server-api/#cross-signing) key ID.
|
|
166
|
+
The server will auto-generate a `device_id`
|
|
167
|
+
if this is not specified.
|
|
168
|
+
initial_device_display_name:
|
|
169
|
+
type: string
|
|
170
|
+
description: |-
|
|
171
|
+
A display name to assign to the newly-created device. Ignored
|
|
172
|
+
if `device_id` corresponds to a known device.
|
|
173
|
+
refresh_token:
|
|
174
|
+
type: boolean
|
|
175
|
+
description: If true, the client supports refresh tokens.
|
|
176
|
+
x-addedInMatrixVersion: "1.3"
|
|
177
|
+
required:
|
|
178
|
+
- type
|
|
179
|
+
required: true
|
|
180
|
+
responses:
|
|
181
|
+
"200":
|
|
182
|
+
description: The user has been authenticated.
|
|
183
|
+
content:
|
|
184
|
+
application/json:
|
|
185
|
+
schema:
|
|
186
|
+
type: object
|
|
187
|
+
properties:
|
|
188
|
+
user_id:
|
|
189
|
+
type: string
|
|
190
|
+
format: mx-user-id
|
|
191
|
+
pattern: "^@"
|
|
192
|
+
description: The fully-qualified Matrix ID for the account.
|
|
193
|
+
access_token:
|
|
194
|
+
type: string
|
|
195
|
+
description: |-
|
|
196
|
+
An access token for the account.
|
|
197
|
+
This access token can then be used to authorize other requests.
|
|
198
|
+
refresh_token:
|
|
199
|
+
type: string
|
|
200
|
+
description: |-
|
|
201
|
+
A refresh token for the account. This token can be used to
|
|
202
|
+
obtain a new access token when it expires by calling the
|
|
203
|
+
`/refresh` endpoint.
|
|
204
|
+
x-addedInMatrixVersion: "1.3"
|
|
205
|
+
expires_in_ms:
|
|
206
|
+
type: integer
|
|
207
|
+
description: |-
|
|
208
|
+
The lifetime of the access token, in milliseconds. Once
|
|
209
|
+
the access token has expired a new access token can be
|
|
210
|
+
obtained by using the provided refresh token. If no
|
|
211
|
+
refresh token is provided, the client will need to re-log in
|
|
212
|
+
to obtain a new access token. If not given, the client can
|
|
213
|
+
assume that the access token will not expire.
|
|
214
|
+
x-addedInMatrixVersion: "1.3"
|
|
215
|
+
home_server:
|
|
216
|
+
type: string
|
|
217
|
+
format: mx-server-name
|
|
218
|
+
deprecated: true
|
|
219
|
+
description: |-
|
|
220
|
+
The server_name of the homeserver on which the account has
|
|
221
|
+
been registered.
|
|
222
|
+
|
|
223
|
+
**Deprecated**. Clients should extract the server_name from
|
|
224
|
+
`user_id` (by splitting at the first colon) if they require
|
|
225
|
+
it. Note also that `homeserver` is not spelt this way.
|
|
226
|
+
device_id:
|
|
227
|
+
type: string
|
|
228
|
+
description: |-
|
|
229
|
+
ID of the logged-in device. Will be the same as the
|
|
230
|
+
corresponding parameter in the request, if one was specified.
|
|
231
|
+
well_known:
|
|
232
|
+
description: |-
|
|
233
|
+
Optional client configuration provided by the server. If present,
|
|
234
|
+
clients SHOULD use the provided object to reconfigure themselves,
|
|
235
|
+
optionally validating the URLs within. This object takes the same
|
|
236
|
+
form as the one returned from .well-known autodiscovery.
|
|
237
|
+
allOf:
|
|
238
|
+
- $ref: definitions/wellknown/full.yaml
|
|
239
|
+
required:
|
|
240
|
+
- access_token
|
|
241
|
+
- device_id
|
|
242
|
+
- user_id
|
|
243
|
+
examples:
|
|
244
|
+
response:
|
|
245
|
+
value: {
|
|
246
|
+
"user_id": "@cheeky_monkey:matrix.org",
|
|
247
|
+
"access_token": "abc123",
|
|
248
|
+
"refresh_token": "def456",
|
|
249
|
+
"expires_in_ms": 60000,
|
|
250
|
+
"device_id": "GHTYAJCE",
|
|
251
|
+
"well_known": {
|
|
252
|
+
"m.homeserver": {
|
|
253
|
+
"base_url": "https://example.org"
|
|
254
|
+
},
|
|
255
|
+
"m.identity_server": {
|
|
256
|
+
"base_url": "https://id.example.org"
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
"400":
|
|
261
|
+
description: |-
|
|
262
|
+
Part of the request was invalid. For example, the login type may not be recognised.
|
|
263
|
+
|
|
264
|
+
Specific error codes used with this status code include:
|
|
265
|
+
* {{% added-in v="1.17" %}} `M_APPSERVICE_LOGIN_UNSUPPORTED`: an application service
|
|
266
|
+
used the `m.login.application_service` type, but the server doesn't support logging
|
|
267
|
+
in via the Legacy authentication API.
|
|
268
|
+
content:
|
|
269
|
+
application/json:
|
|
270
|
+
schema:
|
|
271
|
+
$ref: definitions/errors/error.yaml
|
|
272
|
+
examples:
|
|
273
|
+
response:
|
|
274
|
+
value: {
|
|
275
|
+
"errcode": "M_UNKNOWN",
|
|
276
|
+
"error": "Bad login type."
|
|
277
|
+
}
|
|
278
|
+
"403":
|
|
279
|
+
description: |-
|
|
280
|
+
The login attempt failed. This can include one of the following error codes:
|
|
281
|
+
* `M_FORBIDDEN`: The provided authentication data was incorrect
|
|
282
|
+
or the requested device ID is the same as a cross-signing key
|
|
283
|
+
ID.
|
|
284
|
+
* `M_USER_DEACTIVATED`: The user has been deactivated.
|
|
285
|
+
Servers MAY instead use `M_FORBIDDEN` when they can no longer authenticate
|
|
286
|
+
the deactivated user (e.g. their password has been wiped).
|
|
287
|
+
content:
|
|
288
|
+
application/json:
|
|
289
|
+
schema:
|
|
290
|
+
$ref: definitions/errors/error.yaml
|
|
291
|
+
examples:
|
|
292
|
+
response:
|
|
293
|
+
value: {
|
|
294
|
+
"errcode": "M_FORBIDDEN"
|
|
295
|
+
}
|
|
296
|
+
"429":
|
|
297
|
+
description: This request was rate-limited.
|
|
298
|
+
content:
|
|
299
|
+
application/json:
|
|
300
|
+
schema:
|
|
301
|
+
$ref: definitions/errors/rate_limited.yaml
|
|
302
|
+
tags:
|
|
303
|
+
- Session management
|
|
304
|
+
servers:
|
|
305
|
+
- url: "{protocol}://{hostname}{basePath}"
|
|
306
|
+
variables:
|
|
307
|
+
protocol:
|
|
308
|
+
enum:
|
|
309
|
+
- http
|
|
310
|
+
- https
|
|
311
|
+
default: https
|
|
312
|
+
hostname:
|
|
313
|
+
default: localhost:8008
|
|
314
|
+
basePath:
|
|
315
|
+
default: /_matrix/client/v3
|
|
316
|
+
components:
|
|
317
|
+
securitySchemes:
|
|
318
|
+
accessTokenQuery:
|
|
319
|
+
$ref: definitions/security.yaml#/accessTokenQuery
|
|
320
|
+
accessTokenBearer:
|
|
321
|
+
$ref: definitions/security.yaml#/accessTokenBearer
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Copyright 2023 The Matrix.org Foundation C.I.C.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
openapi: 3.1.0
|
|
15
|
+
info:
|
|
16
|
+
title: Matrix Client-Server Registration and Login API
|
|
17
|
+
version: 1.0.0
|
|
18
|
+
paths:
|
|
19
|
+
/login/get_token:
|
|
20
|
+
post:
|
|
21
|
+
summary: Optional endpoint to generate a single-use, time-limited,
|
|
22
|
+
`m.login.token` token.
|
|
23
|
+
description: |-
|
|
24
|
+
Optional endpoint - the server is not required to implement this endpoint if it does not
|
|
25
|
+
intend to use or support this functionality.
|
|
26
|
+
|
|
27
|
+
This API endpoint uses the [User-Interactive Authentication API](/client-server-api/#user-interactive-authentication-api).
|
|
28
|
+
|
|
29
|
+
An already-authenticated client can call this endpoint to generate a single-use, time-limited,
|
|
30
|
+
token for an unauthenticated client to log in with, becoming logged in as the same user which
|
|
31
|
+
called this endpoint. The unauthenticated client uses the generated token in a `m.login.token`
|
|
32
|
+
login flow with the homeserver.
|
|
33
|
+
|
|
34
|
+
Clients, both authenticated and unauthenticated, might wish to hide user interface which exposes
|
|
35
|
+
this feature if the server is not offering it. Authenticated clients can check for support on
|
|
36
|
+
a per-user basis with the [`m.get_login_token`](/client-server-api/#mget_login_token-capability) capability,
|
|
37
|
+
while unauthenticated clients can detect server support by looking for an `m.login.token` login
|
|
38
|
+
flow with `get_login_token: true` on [`GET /login`](/client-server-api/#post_matrixclientv3login).
|
|
39
|
+
|
|
40
|
+
In v1.7 of the specification, transmission of the generated token to an unauthenticated client is
|
|
41
|
+
left as an implementation detail. Future MSCs such as [MSC3906](https://github.com/matrix-org/matrix-spec-proposals/pull/3906)
|
|
42
|
+
might standardise a way to transmit the token between clients.
|
|
43
|
+
|
|
44
|
+
The generated token MUST only be valid for a single login, enforced by the server. Clients which
|
|
45
|
+
intend to log in multiple devices must generate a token for each.
|
|
46
|
+
|
|
47
|
+
With other User-Interactive Authentication (UIA)-supporting endpoints, servers sometimes do not re-prompt
|
|
48
|
+
for verification if the session recently passed UIA. For this endpoint, servers MUST always re-prompt
|
|
49
|
+
the user for verification to ensure explicit consent is gained for each additional client.
|
|
50
|
+
|
|
51
|
+
Servers are encouraged to apply stricter than normal rate limiting to this endpoint, such as maximum
|
|
52
|
+
of 1 request per minute.
|
|
53
|
+
operationId: generateLoginToken
|
|
54
|
+
x-addedInMatrixVersion: "1.7"
|
|
55
|
+
security:
|
|
56
|
+
- accessTokenQuery: []
|
|
57
|
+
- accessTokenBearer: []
|
|
58
|
+
requestBody:
|
|
59
|
+
content:
|
|
60
|
+
application/json:
|
|
61
|
+
schema:
|
|
62
|
+
type: object
|
|
63
|
+
properties:
|
|
64
|
+
auth:
|
|
65
|
+
description: Additional authentication information for the user-interactive
|
|
66
|
+
authentication API.
|
|
67
|
+
allOf:
|
|
68
|
+
- $ref: definitions/auth_data.yaml
|
|
69
|
+
required: true
|
|
70
|
+
responses:
|
|
71
|
+
"200":
|
|
72
|
+
description: The login token an unauthenticated client can use to log in as the
|
|
73
|
+
requesting user.
|
|
74
|
+
content:
|
|
75
|
+
application/json:
|
|
76
|
+
schema:
|
|
77
|
+
type: object
|
|
78
|
+
required:
|
|
79
|
+
- login_token
|
|
80
|
+
- expires_in_ms
|
|
81
|
+
properties:
|
|
82
|
+
login_token:
|
|
83
|
+
type: string
|
|
84
|
+
description: The login token for the `m.login.token` login flow.
|
|
85
|
+
expires_in_ms:
|
|
86
|
+
type: integer
|
|
87
|
+
description: |-
|
|
88
|
+
The time remaining in milliseconds until the homeserver will no longer accept the token. `120000`
|
|
89
|
+
(2 minutes) is recommended as a default.
|
|
90
|
+
examples:
|
|
91
|
+
response:
|
|
92
|
+
value: {
|
|
93
|
+
"login_token": "<opaque string>",
|
|
94
|
+
"expires_in_ms": 120000
|
|
95
|
+
}
|
|
96
|
+
"400":
|
|
97
|
+
description: |-
|
|
98
|
+
The request was malformed, or the user does not have an ability to generate tokens for their devices,
|
|
99
|
+
as implied by the [User-Interactive Authentication API](/client-server-api/#user-interactive-authentication-api).
|
|
100
|
+
|
|
101
|
+
Clients should verify whether the user has an ability to call this endpoint with the
|
|
102
|
+
[`m.get_login_token`](/client-server-api/#mget_login_token-capability) capability.
|
|
103
|
+
content:
|
|
104
|
+
application/json:
|
|
105
|
+
schema:
|
|
106
|
+
$ref: definitions/errors/error.yaml
|
|
107
|
+
"401":
|
|
108
|
+
description: The homeserver requires additional authentication information.
|
|
109
|
+
content:
|
|
110
|
+
application/json:
|
|
111
|
+
schema:
|
|
112
|
+
$ref: definitions/auth_response.yaml
|
|
113
|
+
"429":
|
|
114
|
+
description: This request was rate-limited.
|
|
115
|
+
content:
|
|
116
|
+
application/json:
|
|
117
|
+
schema:
|
|
118
|
+
$ref: definitions/errors/rate_limited.yaml
|
|
119
|
+
tags:
|
|
120
|
+
- Session management
|
|
121
|
+
servers:
|
|
122
|
+
- url: "{protocol}://{hostname}{basePath}"
|
|
123
|
+
variables:
|
|
124
|
+
protocol:
|
|
125
|
+
enum:
|
|
126
|
+
- http
|
|
127
|
+
- https
|
|
128
|
+
default: https
|
|
129
|
+
hostname:
|
|
130
|
+
default: localhost:8008
|
|
131
|
+
basePath:
|
|
132
|
+
default: /_matrix/client/v1
|
|
133
|
+
components:
|
|
134
|
+
securitySchemes:
|
|
135
|
+
accessTokenQuery:
|
|
136
|
+
$ref: definitions/security.yaml#/accessTokenQuery
|
|
137
|
+
accessTokenBearer:
|
|
138
|
+
$ref: definitions/security.yaml#/accessTokenBearer
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Copyright 2016 OpenMarket Ltd
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
openapi: 3.1.0
|
|
15
|
+
info:
|
|
16
|
+
title: Matrix Client-Server Registration and Login API
|
|
17
|
+
version: 1.0.0
|
|
18
|
+
paths:
|
|
19
|
+
/logout:
|
|
20
|
+
post:
|
|
21
|
+
summary: Invalidates a user access token
|
|
22
|
+
description: |-
|
|
23
|
+
Invalidates an existing access token, so that it can no longer be used for
|
|
24
|
+
authorization. The device associated with the access token is also deleted.
|
|
25
|
+
[Device keys](/client-server-api/#device-keys) for the device are deleted alongside the device.
|
|
26
|
+
operationId: logout
|
|
27
|
+
security:
|
|
28
|
+
- accessTokenQuery: []
|
|
29
|
+
- accessTokenBearer: []
|
|
30
|
+
responses:
|
|
31
|
+
"200":
|
|
32
|
+
description: The access token used in the request was successfully invalidated.
|
|
33
|
+
content:
|
|
34
|
+
application/json:
|
|
35
|
+
schema:
|
|
36
|
+
type: object
|
|
37
|
+
properties: {}
|
|
38
|
+
tags:
|
|
39
|
+
- Session management
|
|
40
|
+
/logout/all:
|
|
41
|
+
post:
|
|
42
|
+
summary: Invalidates all access tokens for a user
|
|
43
|
+
description: |-
|
|
44
|
+
Invalidates all access tokens for a user, so that they can no longer be used for
|
|
45
|
+
authorization. This includes the access token that made this request. All devices
|
|
46
|
+
for the user are also deleted. [Device keys](/client-server-api/#device-keys) for the device are
|
|
47
|
+
deleted alongside the device.
|
|
48
|
+
|
|
49
|
+
This endpoint does not use the [User-Interactive Authentication API](/client-server-api/#user-interactive-authentication-api) because
|
|
50
|
+
User-Interactive Authentication is designed to protect against attacks where
|
|
51
|
+
someone gets hold of a single access token then takes over the account. This
|
|
52
|
+
endpoint invalidates all access tokens for the user, including the token used in
|
|
53
|
+
the request, and therefore the attacker is unable to take over the account in
|
|
54
|
+
this way.
|
|
55
|
+
operationId: logout_all
|
|
56
|
+
security:
|
|
57
|
+
- accessTokenQuery: []
|
|
58
|
+
- accessTokenBearer: []
|
|
59
|
+
responses:
|
|
60
|
+
"200":
|
|
61
|
+
description: The user's access tokens were successfully invalidated.
|
|
62
|
+
content:
|
|
63
|
+
application/json:
|
|
64
|
+
schema:
|
|
65
|
+
type: object
|
|
66
|
+
properties: {}
|
|
67
|
+
tags:
|
|
68
|
+
- Session management
|
|
69
|
+
servers:
|
|
70
|
+
- url: "{protocol}://{hostname}{basePath}"
|
|
71
|
+
variables:
|
|
72
|
+
protocol:
|
|
73
|
+
enum:
|
|
74
|
+
- http
|
|
75
|
+
- https
|
|
76
|
+
default: https
|
|
77
|
+
hostname:
|
|
78
|
+
default: localhost:8008
|
|
79
|
+
basePath:
|
|
80
|
+
default: /_matrix/client/v3
|
|
81
|
+
components:
|
|
82
|
+
securitySchemes:
|
|
83
|
+
accessTokenQuery:
|
|
84
|
+
$ref: definitions/security.yaml#/accessTokenQuery
|
|
85
|
+
accessTokenBearer:
|
|
86
|
+
$ref: definitions/security.yaml#/accessTokenBearer
|