mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Webatrice: KnownHosts component (#4456)
* refactor dexie services for future schema updates Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
This commit is contained in:
parent
37879c4255
commit
6ce346af4a
54 changed files with 1381 additions and 1291 deletions
|
|
@ -1,29 +1,28 @@
|
|||
import { StatusEnum, User } from 'types';
|
||||
import { StatusEnum, User, WebSocketConnectReason, WebSocketConnectOptions } from 'types';
|
||||
import { SessionCommands, webClient } from 'websocket';
|
||||
import { WebSocketConnectReason, WebSocketOptions } from '../websocket/services/WebSocketService';
|
||||
|
||||
export default class AuthenticationService {
|
||||
static connect(options: WebSocketOptions): void {
|
||||
static login(options: WebSocketConnectOptions): void {
|
||||
SessionCommands.connect(options, WebSocketConnectReason.LOGIN);
|
||||
}
|
||||
|
||||
static register(options: WebSocketOptions): void {
|
||||
static register(options: WebSocketConnectOptions): void {
|
||||
SessionCommands.connect(options, WebSocketConnectReason.REGISTER);
|
||||
}
|
||||
|
||||
static activateAccount(options: WebSocketOptions): void {
|
||||
static activateAccount(options: WebSocketConnectOptions): void {
|
||||
SessionCommands.connect(options, WebSocketConnectReason.ACTIVATE_ACCOUNT);
|
||||
}
|
||||
|
||||
static resetPasswordRequest(options: WebSocketOptions): void {
|
||||
static resetPasswordRequest(options: WebSocketConnectOptions): void {
|
||||
SessionCommands.connect(options, WebSocketConnectReason.PASSWORD_RESET_REQUEST);
|
||||
}
|
||||
|
||||
static resetPasswordChallenge(options: WebSocketOptions): void {
|
||||
static resetPasswordChallenge(options: WebSocketConnectOptions): void {
|
||||
SessionCommands.connect(options, WebSocketConnectReason.PASSWORD_RESET_CHALLENGE);
|
||||
}
|
||||
|
||||
static resetPassword(options: WebSocketOptions): void {
|
||||
static resetPassword(options: WebSocketConnectOptions): void {
|
||||
SessionCommands.connect(options, WebSocketConnectReason.PASSWORD_RESET);
|
||||
}
|
||||
|
||||
|
|
@ -44,4 +43,8 @@ export default class AuthenticationService {
|
|||
static isAdmin() {
|
||||
|
||||
}
|
||||
|
||||
static connectionAttemptMade() {
|
||||
return webClient.connectionAttemptMade;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue