azureai-optimizer
Version:
AI-Powered Azure Infrastructure Optimization via Model Context Protocol
39 lines • 1.13 kB
TypeScript
/**
* Azure Authentication Provider
* Handles Azure authentication using DefaultAzureCredential
*/
import { TokenCredential } from '@azure/identity';
export interface AzureConfig {
subscriptionId: string;
tenantId?: string;
clientId?: string;
clientSecret?: string;
managedIdentityClientId?: string;
}
export interface AuthContext {
credential: TokenCredential;
subscriptionId: string;
tenantId: string;
accessToken: string;
expiresOn: Date;
permissions: string[];
}
export declare class AzureAuthProvider {
private credential;
private config;
private logger;
private authContext;
private tokenCache;
constructor(config: AzureConfig);
initialize(): Promise<void>;
private verifySubscriptionAccess;
private getPermissions;
getAuthContext(): Promise<AuthContext | null>;
private isTokenExpired;
private refreshToken;
getTokenForScope(scope: string): Promise<string>;
getCredential(): TokenCredential;
getSubscriptionId(): string;
hasPermission(permission: string): boolean;
}
//# sourceMappingURL=azure-auth.d.ts.map