• Adds an authenticator to either a websocket route or outbound. The outbound is only sent when the authentication passes. Otherwise, no error message is sent. If a route is secured using this outbound, the function is only called when the authenticator passes. When the authenticator does not pass, an error message (m.error) is sent to the client.

    Parameters

    Returns ((target, propertyKey) => any)

      • (target, propertyKey): any
      • Parameters

        • target: any
        • propertyKey: string

        Returns any

    Example

    Method annotation for outbound:

    class Example {
    @Outbound("d.example")
    @Auth(new MyAuthenticator())
    async getData(connection: WebsocketConnection): Promise<any> {
    return [...];
    }
    }

Generated using TypeDoc