UNPKG

@vectorx/cloud-toolkit

Version:

VectorX Cloud Toolkit

23 lines (22 loc) 714 B
import type { IAuthService, LoginInfo } from "../container"; export interface CheckStatusResponse { code: number; msg: string; data: LoginInfo; } export type CheckStatusRequest = { secret_id: string; nonce: string; cli_token: string; }; export declare class AuthService implements IAuthService { private readonly configDir; private readonly configFile; constructor(); getToken(secretId: string, secretKey: string, nonce: string): string; hasLogin(): boolean; saveLoginInfo(loginInfo: LoginInfo): Promise<void>; getLoginInfo(): Promise<LoginInfo | null>; check(params: CheckStatusRequest): Promise<CheckStatusResponse>; clearLoginInfo(): Promise<void>; }