MineJSv0.5.1

AuthClient

Source: auth.ts:125

Auth client, for authenticating Microsoft account


Constructors

new AuthClient(option: AuthOption): AuthClient

Parameters

Returns

AuthClient


Methods

getKeyPair( ): Promise<{ expiresAt: number; publicKey: string; signature: string }>

Get player key pair for signing stuff

Returns

  • Promise<{ expiresAt: number; publicKey: string; signature: string }>

getUUID(): Promise<{ name: string; uuid: string }>

Get player UUID

Returns

  • Promise<{ name: string; uuid: string }>

sendAuth( serverId: string, sharedSecret: Buffer, publicKey: Buffer, ): Promise<void>

Send a auth notify to Minecraft server, after receive Encryption Request

Parameters

  • serverId (string)
  • sharedSecret (Buffer)
  • publicKey (Buffer)

Returns

  • Promise<void>