import CancellationToken from 'cancellationtoken'; import { IAuthorizationService } from './IAuthorizationService'; import { IDisposable } from './IDisposable'; import { ProtectedOperation } from './ProtectedOperation'; /** * A caching client of the [IAuthorizationService](#IAuthorizationService) */ export declare class AuthorizationServiceClient implements IDisposable { private authService; private ownsAuthService; /** * Indicates if the client has already been disposed */ private isDisposed; /** * Initializes a new instance of the [AuthorizationServiceClient](#AuthorizationServiceClient) class * @param authService The authorization service to use with requests * @param ownsAuthService Indicates if the client owns the authorization service */ constructor(authService: IAuthorizationService, ownsAuthService?: boolean); /** * Gets the current user's credentials * @param cancellationToken A cancellation token */ getCredentials(cancellationToken?: CancellationToken): Promise<{ [key: string]: string; }>; /** * Checks if a user is authorized to perform the operation * @param operation The operation to be performed * @param cancellationToken A cancellation token */ checkAuthorization(operation: ProtectedOperation, cancellationToken?: CancellationToken): Promise; /** * Disposes the authorization client and its underlying resources */ dispose(): void; }