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 35 36 37 38 39 40 41 | import { AuthCredential, MicrosoftAuthCredential } 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>;
/**
* Acquires a Microsoft access token via the Mentor Microsoft auth provider command.
* Returns `null` if the user cancels or the login fails.
* @param scopes The requested OAuth scopes.
*/
fetchMicrosoftCredential(scopes: string[]): Promise<MicrosoftAuthCredential | null>;
}
|