Ditto JS SDK v5.0.0
    Preparing search index...

    Class ConnectionRequest

    Contains information about a remote peer that has requested a connection.

    Connection requests and their authorization are scoped to a specific Ditto peer and connection type.

    Index

    Constructors

    Accessors

    • get connectionType(): ConnectionType

      The network transport of this connection request.

      Expect to receive separate connection requests for each network transport that connects the local and remote peer.

      Returns ConnectionType

    • get identityServiceMetadata(): Record<string, any>

      Metadata for the remote peer that is provided by the identity service.

      Use an authentication webhook to set this value. See Ditto's online documentation for more information on how to configure an authentication webhook.

      Convenience property that wraps identityServiceMetadataJSONString.

      Returns Record<string, any>

    • get identityServiceMetadataJSONString(): string

      JSON-encoded metadata for the remote peer that is provided by the identity service.

      Use an authentication webhook to set this value. See Ditto's online documentation for more information on how to configure an authentication webhook.

      Uses UTF-8 encoding.

      Returns string

    • get peerKey(): string

      The unique peer key of the remote peer.

      Returns string

      field peerKey on Peer for more information on peer keys.

    • get peerMetadataJSONString(): string

      JSON-encoded metadata associated with the remote peer.

      This is a JSON string representing an empty dictionary if the remote peer has not set any metadata.

      Set peer metadata for the local peer using Presence.peerMetadata or Presence.peerMetadataJSONString.

      Uses UTF-8 encoding.

      Returns string