UNPKG

@clusterio/plugin-player_auth

Version:

Clusterio plugin authenticating logged in players to the web interface

59 lines 1.77 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SetVerifyCodeRequest = exports.FetchPlayerCodeRequest = void 0; const typebox_1 = require("@sinclair/typebox"); class FetchPlayerCodeResponse { playerCode; controllerUrl; constructor(playerCode, controllerUrl) { this.playerCode = playerCode; this.controllerUrl = controllerUrl; } static jsonSchema = typebox_1.Type.Object({ "playerCode": typebox_1.Type.String(), "controllerUrl": typebox_1.Type.String(), }); static fromJSON(json) { return new this(json.playerCode, json.controllerUrl); } } ; class FetchPlayerCodeRequest { player; static type = "request"; static src = "instance"; static dst = "controller"; static plugin = "player_auth"; static Response = FetchPlayerCodeResponse; constructor(player) { this.player = player; } static jsonSchema = typebox_1.Type.Object({ "player": typebox_1.Type.String(), }); static fromJSON(json) { return new this(json.player); } } exports.FetchPlayerCodeRequest = FetchPlayerCodeRequest; class SetVerifyCodeRequest { player; verifyCode; static type = "request"; static src = "instance"; static dst = "controller"; static plugin = "player_auth"; constructor(player, verifyCode) { this.player = player; this.verifyCode = verifyCode; } static jsonSchema = typebox_1.Type.Object({ "player": typebox_1.Type.String(), "verifyCode": typebox_1.Type.String(), }); static fromJSON(json) { return new this(json.player, json.verifyCode); } } exports.SetVerifyCodeRequest = SetVerifyCodeRequest; //# sourceMappingURL=messages.js.map