Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "src/lib/helpers/register-endpoint"

Index

Variables

CLIENT_INFO_HEADER

CLIENT_INFO_HEADER: string = utils.stringifyHeaderParams({os: "Windows",osVer: "10",proc: "Win64",lcid: "en-us",deviceType: "1",country: "n/a",clientName: Consts.SKYPEWEB_CLIENTINFO_NAME,clientVer: Consts.SKYPEWEB_CLIENTINFO_VERSION,})

Value used for the ClientInfo header of the request for the registration token.

Functions

getLockAndKeyHeader

  • getLockAndKeyHeader(time: number): string
  • Get the value for the LockAndKey header of the request for the registration token.

    Parameters

    • time: number

      Seconds since UNIX epoch

    Returns string

getLockAndKeyResponse

  • getLockAndKeyResponse(time: number): string

readSetRegistrationTokenHeader

  • readSetRegistrationTokenHeader(hostname: string, header: string): RegistrationToken
  • Parse the Set-Registrationtoken header of an endpoint registration response.

    This header has the following shape: "registrationToken=someString; expires=someNumber; endpointId={someString}"

    Parameters

    • hostname: string

      Name of the hostname for this registration token.

    • header: string

      String value of the Set-Registration header.

    Returns RegistrationToken

    Parsed registration token

registerEndpoint

  • Get the registration token used to subscribe to resources.

    throws

    EndpointRegistrationError

    Parameters

    • io: HttpIo

      Cookies and HTTP library to use.

    • cookies: CookieStore

      Cookie jar to use.

    • skypeToken: SkypeToken

      The Skype to use for authentication.

    • messagesHostname: string

      Hostname of the messages server.

    • Default value retries: number = 2

      Number of request retries before emitting an error. Example: if retries is 1, this function will send 1 or 2 requests.

    Returns Promise<RegistrationToken>

    Registration token

Generated using TypeDoc