/// import 'isomorphic-fetch'; import { IncomingMessage, ServerResponse } from 'http'; export interface AuthorizeResponse { accessToken: string; accessTokenExpiration: number; refreshToken: string; refreshTokenExpiration: number; } /** * A Node handler for processing incoming requests to exchange an Authorization Code * for an Access Token using the WordPress API. Once the code is exchanged, this * handler stores the Access Token on the cookie and redirects to the frontend. * * @param {IncomingMessage} req * @param {ServerResponse} res * * @see https://faustjs.org/docs/next/guides/auth */ export declare function authorizeHandler(req: IncomingMessage, res: ServerResponse): Promise; /** * A Node handler for processing incoming requests to logout an authenticated user. * This handler clears the refresh token from the cookie and returns a response. * * If the request has a redirect_uri query parameter, the response also * includes wordpressLogoutUrl: sending the browser there ends its WordPress * session, so a user who logged in through WordPress isn't logged straight * back in, and then redirects to redirect_uri. * * @param {IncomingMessage} req * @param {ServerResponse} res * * @see https://faustjs.org/docs/next/guides/auth */ export declare function logoutHandler(req: IncomingMessage, res: ServerResponse): Promise;