v0.10.0

Interface: AuthModule

Interface defining authentication functionality for the Shoehive framework. Implementations should provide methods to authenticate players during connection.

Table of contents

Methods

Methods

authenticatePlayer

authenticatePlayer(options): Promise<null | string>

Authenticates a player based on their HTTP request during WebSocket connection.

Parameters

Name Type
options Object
options.request IncomingMessage

Returns

Promise<null | string>

A promise that resolves to a player ID if authentication is successful, or null if it fails