///
import * as http from 'http';
import { MaybePromise } from '../../common';
import { ElectronSecurityToken } from '../../electron-common/electron-token';
import { WsRequestValidatorContribution } from '../../node/ws-request-validators';
/**
* On Electron, we want to make sure that only Electron's browser-windows access the backend services.
*/
export declare class ElectronTokenValidator implements WsRequestValidatorContribution {
protected electronSecurityToken: ElectronSecurityToken;
protected postConstruct(): void;
allowWsUpgrade(request: http.IncomingMessage): MaybePromise;
/**
* Expects the token to be passed via cookies by default.
*/
allowRequest(request: http.IncomingMessage): boolean;
/**
* Validates a token.
*
* This method both checks the shape of the parsed token data and its actual value.
*
* @param token Parsed object sent by the client as the token.
*/
isTokenValid(token: unknown): boolean;
/**
* Returns the token to compare to when authorizing requests.
*/
protected getToken(): ElectronSecurityToken;
}
//# sourceMappingURL=electron-token-validator.d.ts.map