The authenticator to be added.
Method annotation for outbound:
class Example {
@Outbound("d.example")
@Auth(new MyAuthenticator())
async getData(connection: WebsocketConnection): Promise<any> {
return [...];
}
}
Generated using TypeDoc
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.