@coretext-ai/qa-gsuite-f47ac10b-58cc-4372-a567-0e02b2c3d479
Version:
MCP server with GSuite (Contacts, Drive, Gmail, Calendar) integration
51 lines • 1.25 kB
TypeScript
export interface OAuth2Tokens {
access_token?: string | null;
refresh_token?: string | null;
expiry_date?: number | null;
scope?: string | null;
token_type?: string | null;
}
export declare class GoogleOAuthClient {
private oauth2Client;
private tokenManager;
private credentialLoader;
private scopes;
constructor();
/**
* Initialize OAuth client
*/
initialize(): Promise<void>;
/**
* Ensure we have a valid access token
*/
getValidAccessToken(): Promise<string>;
/**
* Start OAuth authorization flow
*/
private authorize;
/**
* Exchange authorization code for tokens
*/
private exchangeCodeForTokens;
/**
* Refresh expired access token
*/
private refreshTokens;
/**
* Check if token is expired (with 5-minute buffer)
*/
private isTokenExpired;
/**
* Start a local HTTP server to handle OAuth callback
*/
private startCallbackServer;
/**
* Revoke tokens and clear stored credentials
*/
revokeTokens(): Promise<void>;
/**
* Check if user has valid authentication
*/
isAuthenticated(): Promise<boolean>;
}
//# sourceMappingURL=google-oauth-client.d.ts.map