@salesforce/core
    Preparing search index...

    Class WebServer

    Handles the actions specific to the http server

    Hierarchy

    • AsyncCreatable<WebServer.Options>
      • WebServer
    Index
    host: string = 'localhost'
    port: number = WebOAuthServer.DEFAULT_PORT
    server: Server
    DEFAULT_CLIENT_SOCKET_TIMEOUT: number = 20_000
    • sends a response redirect.

      Parameters

      • status: number

        the statusCode for the response.

      • url: string

        the url to redirect to.

      • response: ServerResponse

        the response to write the redirect to.

      Returns void

    • Parameters

      • response: ServerResponse

      Returns Promise<void>

    • Parameters

      • response: ServerResponse

      Returns Promise<void>

    • sends a response to the browser reporting an error.

      Parameters

      • error: Error

        the oauth error

      • response: ServerResponse

        the HTTP response.

      Returns void

    • sends a response to the browser reporting the success.

      Parameters

      • response: ServerResponse

        the HTTP response.

      Returns void

    • sends a response error.

      Parameters

      • status: number

        the statusCode for the response.

      • message: string

        the message for the http body.

      • response: ServerResponse

        the response to write the error to.

      Returns void

    • Sets a callback to be executed when the authentication timeout occurs

      Parameters

      • callback: () => void

      Returns void

    • Starts the http server after checking that the port is open

      Returns Promise<void>