import express from 'express';
import OAuth2Server from '@node-oauth/oauth2-server';
import { MOAuthClient } from '../../types/models';
import { HttpStatusCode } from '../../../shared/models';
import { BypassLogin } from './oauth-model';
declare class MissingTwoFactorError extends Error {
    code: HttpStatusCode;
    name: string;
}
declare class InvalidTwoFactorError extends Error {
    code: HttpStatusCode;
    name: string;
}
declare function handleOAuthToken(req: express.Request, options: {
    refreshTokenAuthName?: string;
    bypassLogin?: BypassLogin;
}): Promise<{
    accessToken: string;
    accessTokenExpiresAt: Date;
    refreshToken: string;
    refreshTokenExpiresAt: Date;
    client: MOAuthClient;
    user: import("../../types/models").MUser;
    accessTokenExpiresIn: number;
    refreshTokenExpiresIn: number;
}>;
declare function handleOAuthAuthenticate(req: express.Request, res: express.Response): Promise<OAuth2Server.Token>;
export { MissingTwoFactorError, InvalidTwoFactorError, handleOAuthToken, handleOAuthAuthenticate };
//# sourceMappingURL=oauth.d.ts.map