# Functions
Allowed checks whether an event is allowed by the auth events.
CanonicalJSON re-encodes the JSON in a canonical encoding.
CanonicalJSONAssumeValid is the same as CanonicalJSON, but assumes the input is valid JSON.
No description provided by the author
CheckKeys checks the keys returned from a server to make sure they are valid.
Check that a response to /send_join is valid.
CheckStateResponse checks that a response to /state is valid.
CompactJSON makes the encoded JSON as small as possible by removing whitespace and unneeded unicode escapes.
Returns a gomatrixserverlib.BadJSONError if the canonical JSON fails enforced checks or if JSON validation fails.
No description provided by the author
No description provided by the author
HandleInvite - Ensures the incoming invite request is valid and signs the event to return back to the remote server.
No description provided by the author
No description provided by the author
No description provided by the author
nolint: gocyclo.
HeaderedReverseTopologicalOrdering takes a set of input events and sorts them using Kahn's algorithm in order to topologically order them.
No description provided by the author
LineariseStateResponse combines the auth events and the state events and returns them in an order where every event comes after its auth events.
ListKeyIDs lists the key IDs a given entity has signed a message with.
MustGetRoomVersion is GetRoomVersion but panics if the version doesn't exist.
NewAuthEvents returns an AuthEventProvider backed by the given events.
NewCreateContentFromAuthEvents loads the create event content from the create event in the auth events.
NewEventFromHeaderedJSON creates a new event where the room version is embedded in the JSON bytes.
No description provided by the author
NewEventsLoader returns a new events loader.
NewInviteStrippedState creates a stripped state event from a regular state event.
NewJoinRuleContentFromAuthEvents loads the join rule content from the join rules event in the auth event.
NewMemberContentFromAuthEvents loads the member content from the member event for the senderID in the auth events.
NewMemberContentFromEvent parse the member content from an event.
NewPowerLevelContentFromAuthEvents loads the power level content from the power level event in the auth events or returns the default values if there is no power level event.
NewPowerLevelContentFromEvent loads the power level content from an event.
NewThirdPartyInviteContentFromAuthEvents loads the third party invite content from the third party invite event for the state key (token) in the auth events.
NoStrictValidityCheck doesn't perform any validation of potentially expired signing keys.
PerformInvite - Performs all the checks required to validate the invite is allowed to happen.
PerformJoin provides high level functionality that will attempt a federated room join.
RawJSONFromResult extracts the raw JSON bytes pointed to by result.
RequestBackfill implements the server logic for making backfill requests to other servers.
ResolveConflicts performs state resolution on the input events, returning the resolved state.
ResolveStateConflicts takes a list of state events with conflicting state keys and works out which event should be used for each state event.
ResolveStateConflicts takes a list of state events with conflicting state keys and works out which event should be used for each state event.
ReverseTopologicalOrdering takes a set of input events and sorts them using Kahn's algorithm in order to topologically order them.
RoomVersions returns information about room versions currently implemented by this commit of gomatrixserverlib.
SignJSON signs a JSON object returning a copy signed with the given key.
SortJSON reencodes the JSON with the object keys sorted by lexicographically by codepoint.
SplitID splits a matrix ID into a local part and a server name.
StableRoomVersion returns true if the provided room version is both known (i.e.
StableRoomVersions returns a map of descriptions for room versions that are marked as stable.
StateNeededForAuth returns the event types and state_keys needed to authenticate an event.
StateNeededForProtoEvent returns the event types and state_keys needed to authenticate the event being built.
StrictValiditySignatureCheck performs validation of potentially expired signing keys.
Convert a slice of concrete PDU implementations to a slice of PDUs.
No description provided by the author
VerifyAuthRulesAtState will check that the auth_events in the given event are valid at the state of the room before that event.
VerifyEventAuthChain will verify that the event is allowed according to its auth_events, and then recursively verify each of those auth_events.
No description provided by the author
VerifyJSON checks that the entity has signed the message using a particular key.
# Constants
prev_events and auth_events as event references.
prev_events and auth_events as string array of event IDs.
randomised.
base64-encoded hash of event.
URL-safe base64-encoded hash of event.
Event validation errors.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
PublicKeyNotExpired is a magic value for PublicKeyLookupResult.ExpiredTS: it indicates that this is an active key which has not yet expired.
PublicKeyNotValid is a magic value for PublicKeyLookupResult.ValidUntilTS: it is used when we don't have a validity period for this key.
Room version constants.
Room version constants.
Room version constants.
Room version constants.
Room version constants.
Room version constants.
Room version constants.
Room version constants.
Room version constants.
Room version constants.
Room version constants.
Room version constants.
state resolution v1.
state resolution v2.
Sort events by prev_events or auth_events.
Sort events by prev_events or auth_events.
# Variables
No description provided by the author
# Structs
No description provided by the author
AuthEvents is an implementation of AuthEventProvider backed by a map.
No description provided by the author
No description provided by the author
CreateContent is the JSON content of a m.room.create event along with the top level keys needed for auth.
DeviceListUpdateEvent is https://matrix.org/docs/spec/server_server/latest#m-device-list-update-schema.
A DirectKeyFetcher fetches keys directly from a server.
Ed25519Checks are the checks that are applied to Ed25519 keys in ServerKey responses.
EDU represents a EDU received via federation https://matrix.org/docs/spec/server_server/unstable.html#edus.
An EventBuilder is used to build a new event.
EventLoadResult is the result of loading and verifying an event in the EventsLoader.
EventsLoader loads untrusted events and verifies them.
EventValidationError is returned if there is a problem validating an event.
FederatedStateProvider is an implementation of StateProvider which solely uses federation requests to retrieve events.
FederationError contains context surrounding why a federation request may have failed.
FledglingEvent is a helper representation of an event used when creating many events in succession.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
HistoryVisibilityContent is the JSON content of a m.room.history_visibility event.
InviteStrippedState is a cut-down set of fields from room state events that allow the invited server to identify the room.
JoinRuleContent is the JSON content of a m.room.join_rules event needed for auth checks.
No description provided by the author
JSONVerifierSelf provides methods to validate signatures signed by pseudo identities.
KeyChecks are the checks that should be applied to ServerKey responses.
A KeyRing stores keys for matrix servers and provides methods for verifying JSON messages.
No description provided by the author
MemberContent is the JSON content of a m.room.member event needed for auth checks.
MemberThirdPartyInvite is the "Invite" structure defined at http://matrix.org/docs/spec/client_server/r0.2.0.html#m-room-member.
MemberThirdPartyInviteSigned is the "signed" structure defined at http://matrix.org/docs/spec/client_server/r0.2.0.html#m-room-member.
MissingAuthEventError refers to a situation where one of the auth event for a given event was not found.
No description provided by the author
A NotAllowed error is returned if an event does not pass the auth checks.
An OldVerifyKey is an old ed25519 public key that is no longer valid.
No description provided by the author
No description provided by the author
No description provided by the author
A PerspectiveKeyFetcher fetches server keys from a single perspective server.
PowerLevelContent is the JSON content of a m.room.power_levels event needed for auth checks.
PreviousRoom is the "Previous Room" structure defined at https://matrix.org/docs/spec/client_server/r0.5.0#m-room-create.
No description provided by the author
PublicKey is the "PublicKeys" structure defined at https://matrix.org/docs/spec/client_server/r0.5.0#m-room-third-party-invite.
A PublicKeyLookupRequest is a request for a public key with a particular key ID.
A PublicKeyLookupResult is the result of looking up a server signing key.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RoomVersionDescription contains information about a room version, namely whether it is marked as supported or stable in this server version, along with the state resolution algorithm, event ID etc formats used.
No description provided by the author
ServerKeyFields are the parsed JSON contents of the ed25519 signing keys published by a matrix server.
ServerKeys are the ed25519 signing keys published by a matrix server.
No description provided by the author
A StateKeyTuple is the combination of an event type and an event state key.
StateNeeded lists the event types and state_keys needed to authenticate an event.
ThirdPartyInviteContent is the JSON content of a m.room.third_party_invite event needed for auth checks.
No description provided by the author
A Transaction is used to push data from one matrix server to another matrix server.
UnsupportedRoomVersionError occurs when a call has been made with a room version that is not supported by this version of gomatrixserverlib.
A VerifyJSONRequest is a request to check for a signature on a JSON message.
A VerifyJSONResult is the result of checking the signature of a JSON message.
A VerifyKey is a ed25519 public key for a server.
# Interfaces
AuthEventProvider provides auth_events for the authentication checks.
BackfillClient contains the necessary functions from the federation client to perform a backfill request from another homeserver.
BackfillRequester contains the necessary functions to perform backfill requests from one server to another.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
A JSONVerifier is an object which can verify the signatures of JSON messages.
No description provided by the author
A KeyDatabase is a store for caching public keys.
A KeyFetcher is a way of fetching public keys in bulk.
No description provided by the author
No description provided by the author
No description provided by the author
RestrictedRoomJoinQuerier provides the information needed when processing a restricted room join request.
No description provided by the author
No description provided by the author
No description provided by the author
StateProvider is capable of returning the room state at any point in time.
No description provided by the author
No description provided by the author
# Type aliases
EventFormat refers to the formatting of the event fields struct.
EventIDFormat refers to the formatting used to generate new event IDs.
No description provided by the author
EventProvider returns the requested list of events.
No description provided by the author
A HexString is a string of bytes that are hex encoded when used in JSON.
No description provided by the author
IsRejected should return if the given eventID is rejected or not.
A KeyID is the ID of a ed25519 key used to sign JSON.
RoomVersion refers to the room version for a specific room.
SignatureValidityCheckFunc is a function used to validate signing keys.
StateResAlgorithm refers to a version of the state resolution algorithm.
TopologicalOrder represents how to sort a list of events, used primarily in ReverseTopologicalOrdering.
A TransactionID identifies a transaction sent by a matrix server to another matrix server.