1 | import { Event } from '../common/event';
|
2 | import { KeytarService } from '../common/keytar-protocol';
|
3 | export interface CredentialsProvider {
|
4 | getPassword(service: string, account: string): Promise<string | undefined>;
|
5 | setPassword(service: string, account: string, password: string): Promise<void>;
|
6 | deletePassword(service: string, account: string): Promise<boolean>;
|
7 | findPassword(service: string): Promise<string | undefined>;
|
8 | findCredentials(service: string): Promise<Array<{
|
9 | account: string;
|
10 | password: string;
|
11 | }>>;
|
12 | }
|
13 | export declare const CredentialsService: unique symbol;
|
14 | export interface CredentialsService extends CredentialsProvider {
|
15 | readonly onDidChangePassword: Event<CredentialsChangeEvent>;
|
16 | }
|
17 | export interface CredentialsChangeEvent {
|
18 | service: string;
|
19 | account: string;
|
20 | }
|
21 | export declare class CredentialsServiceImpl implements CredentialsService {
|
22 | private readonly keytarService;
|
23 | private onDidChangePasswordEmitter;
|
24 | readonly onDidChangePassword: Event<CredentialsChangeEvent>;
|
25 | private credentialsProvider;
|
26 | constructor(keytarService: KeytarService);
|
27 | getPassword(service: string, account: string): Promise<string | undefined>;
|
28 | setPassword(service: string, account: string, password: string): Promise<void>;
|
29 | deletePassword(service: string, account: string): Promise<boolean>;
|
30 | findPassword(service: string): Promise<string | undefined>;
|
31 | findCredentials(service: string): Promise<Array<{
|
32 | account: string;
|
33 | password: string;
|
34 | }>>;
|
35 | }
|
36 |
|
\ | No newline at end of file |