v0.9.5
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(request): Promise<null | string>
Authenticates a player based on their HTTP request during WebSocket connection.
Parameters
| Name | Type | Description |
|---|---|---|
request | IncomingMessage | The incoming HTTP request during WebSocket connection |
Returns
Promise<null | string>
A promise that resolves to a player ID if authentication is successful, or null if it fails