declare const _default: RocketChatAuthService; export default _default; /** * Authentication service for Rocket.Chat. * Handles both OAuth and personal token authentication modes. */ declare class RocketChatAuthService { credentials: { userId: string; authToken: string; }; config: { CHAT_ENABLED: boolean; ROCKETCHAT_HOST: string; ROCKETCHAT_WS_URL: string; CHAT_OAUTH_ENABLED: boolean; CHAT_OAUTH_SERVICE: string; }; /** * Initialize the auth service with configuration. * * @param {Object} config - Configuration object * @param {boolean} config.CHAT_ENABLED - Whether chat is enabled * @param {string} config.ROCKETCHAT_HOST - Rocket.Chat server URL * @param {string} config.ROCKETCHAT_WS_URL - Rocket.Chat WebSocket URL * @param {boolean} config.CHAT_OAUTH_ENABLED - Whether OAuth is enabled * @param {string} config.CHAT_OAUTH_SERVICE - OAuth service name (e.g., 'keycloak') */ init(config: { CHAT_ENABLED: boolean; ROCKETCHAT_HOST: string; ROCKETCHAT_WS_URL: string; CHAT_OAUTH_ENABLED: boolean; CHAT_OAUTH_SERVICE: string; }): void; /** * Check if chat is enabled and configured. */ isEnabled(): boolean; /** * Check if OAuth authentication is enabled. */ isOAuthEnabled(): boolean; /** * Get the Rocket.Chat server URL (without trailing slash). */ getServerUrl(): string; /** * Get the Rocket.Chat WebSocket URL. */ getWebSocketUrl(): string; /** * Get authentication credentials. * Tries OAuth first if enabled, falls back to personal token. * * @returns {Promise<{userId: string, authToken: string}|null>} */ getCredentials(): Promise<{ userId: string; authToken: string; } | null>; /** * Clear cached credentials. */ clearCredentials(): void; /** * Verify that credentials are valid by making a test API call. * * @returns {Promise} */ verifyCredentials(): Promise; /** * Get the current user's Rocket.Chat profile. * * @returns {Promise} */ getCurrentUser(): Promise; } //# sourceMappingURL=RocketChatAuthService.d.ts.map