package.dist.src.internal.internal-auth-client.d.ts Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk Show documentation
Show all versions of sdk Show documentation
Client SDK for Momento services
The newest version!
import { ExpiresIn, RefreshApiKey, GenerateApiKey, PermissionScope, GenerateDisposableToken, DisposableTokenScope } from '@gomomento/sdk-core';
import { IAuthClient } from '@gomomento/sdk-core/dist/src/internal/clients';
import { permission_messages } from '@gomomento/generated-types/dist/permissionmessages';
import { DisposableTokenProps } from '@gomomento/sdk-core/dist/src/auth/tokens/disposable-token-scope';
import { AuthClientAllProps } from './auth-client-all-props';
export declare class InternalAuthClient implements IAuthClient {
private static readonly REQUEST_TIMEOUT_MS;
private readonly cacheServiceErrorMapper;
private readonly creds;
private readonly interceptors;
private readonly tokenClient;
private readonly authClient;
constructor(props: AuthClientAllProps);
generateApiKey(scope: PermissionScope, expiresIn: ExpiresIn): Promise;
/**
* @deprecated please use `generateApiKey` instead
*/
generateAuthToken(scope: PermissionScope, expiresIn: ExpiresIn): Promise;
refreshApiKey(refreshToken: string): Promise;
/**
* @deprecated please use `refreshApiKey` instead
*/
refreshAuthToken(refreshToken: string): Promise;
generateDisposableToken(scope: DisposableTokenScope, expiresIn: ExpiresIn, disposableTokenProps?: DisposableTokenProps): Promise;
}
export declare function permissionsFromTokenScope(scope: PermissionScope): permission_messages.Permissions;
export declare function permissionsFromDisposableTokenScope(scope: DisposableTokenScope): permission_messages.Permissions;