mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-01-07 02:24:27 -08:00
Support Registration on Webatrice with a baseline of handling. (#4436)
* Support Registration on Webatrice with a baseline of handling. Still needs to support activation tokens & unit testing. * Add support for account activation with token * Activate Account refactor * Fix typo * Add Unit Testing for Commands/Events * Changes based on review feedback
This commit is contained in:
@@ -1,10 +1,18 @@
|
||||
import { ServerConnectParams } from "store";
|
||||
import { StatusEnum, User} from "types";
|
||||
import { webClient, SessionCommands } from "websocket";
|
||||
import {StatusEnum, User} from "types";
|
||||
import {SessionCommands, webClient} from "websocket";
|
||||
import {WebSocketConnectReason, WebSocketOptions} from "../websocket/services/WebSocketService";
|
||||
|
||||
export default class AuthenticationService {
|
||||
static connect(options: ServerConnectParams): void {
|
||||
SessionCommands.connect(options);
|
||||
static connect(options: WebSocketOptions): void {
|
||||
SessionCommands.connect(options, WebSocketConnectReason.LOGIN);
|
||||
}
|
||||
|
||||
static register(options: WebSocketOptions): void {
|
||||
SessionCommands.connect(options, WebSocketConnectReason.REGISTER);
|
||||
}
|
||||
|
||||
static activateAccount(options: WebSocketOptions): void {
|
||||
SessionCommands.connect(options, WebSocketConnectReason.ACTIVATE_ACCOUNT);
|
||||
}
|
||||
|
||||
static disconnect(): void {
|
||||
|
||||
Reference in New Issue
Block a user