All files / services/core credential-storage-service.interface.ts

0% Statements 0/0
0% Branches 0/0
0% Functions 0/0
0% Lines 0/0

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34                                                                   
import { AuthCredential } from '@src/services/core/credential';
 
/**
 * Interface for the CredentialStorageService.
 */
export interface ICredentialStorageService {
	/**
	 * Stores a credential for the given URI.
	 * @param uri The URI for which to store the credential.
	 * @param credential The credential to store.
	 */
	saveCredential(uri: string, credential: AuthCredential): Promise<void>;
 
	/**
	 * Retrieves the stored credential for the given URI.
	 * @param uri The URI for which to retrieve the credential.
	 * @returns The stored credential, or undefined if none is found.
	 */
	getCredential(uri: string): Promise<AuthCredential | undefined>;
 
	/**
	 * Deletes the stored credential for the given URI.
	 * @param uri The URI for which to delete the credential.
	 */
	deleteCredential(uri: string): Promise<void>;
 
	/**
	 * Updates the stored credential for the given URI.
	 * @param uri The URI for which to update the credential.
	 * @param credential The new credential to store.
	 */
	updateCredential(uri: string, credential: AuthCredential): Promise<void>;
}