Class AuthableDecorableFunctionAbstract

Represents the reference to an object method used for websocket routes and outbounds with support for authentication.

Hierarchy

Constructors

Properties

authenticator: WebsocketAuthenticator = null
isOutbound: boolean = false
objConfig: {
    propertyKey: string;
    target: any;
}

The configuration object for the object method.

Type declaration

  • propertyKey: string
  • target: any

Accessors

  • get Func(): ((...data) => any)
  • Returns the decorated function with added authentication checks.

    Returns ((...data) => any)

    • The decorated function.
      • (...data): any
      • Returns the decorated function with added authentication checks.

        Parameters

        • Rest ...data: any[]

        Returns any

        • The decorated function.
  • get hasAuthenticator(): boolean
  • Checks if the decorated function has an authenticator.

    Returns boolean

    • Indicates whether the decorated function has an authenticator.

Methods

  • Protected

    Sends an error message through the websocket connection.

    Parameters

    • conn: WebsocketConnection

      The websocket connection.

    • message: string

      The error message.

    • Optional authError: boolean

    Returns void

Generated using TypeDoc