2016-10-27 08:58:02 +00:00
|
|
|
declare module 'react-native-keychain' {
|
|
|
|
|
|
|
|
export interface UserCredentials {
|
|
|
|
username: string;
|
|
|
|
password: string;
|
|
|
|
}
|
|
|
|
|
2017-01-10 22:07:11 +00:00
|
|
|
export interface SharedWebCredentials {
|
|
|
|
server: string;
|
|
|
|
username: string;
|
|
|
|
password: string;
|
|
|
|
}
|
|
|
|
|
2018-02-25 14:55:17 +00:00
|
|
|
export interface SecureOptions {
|
2018-02-25 18:20:49 +00:00
|
|
|
service: string;
|
|
|
|
customPrompt?: string;
|
|
|
|
authenticationType?: string;
|
|
|
|
accessControl?: string;
|
2018-02-25 14:55:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function canImplyAuthentication(
|
2018-02-25 18:20:49 +00:00
|
|
|
options?: SecureOptions
|
2018-02-25 14:55:17 +00:00
|
|
|
): Promise<boolean>;
|
|
|
|
|
|
|
|
function setSecurePassword(
|
2018-02-25 18:20:49 +00:00
|
|
|
username: string,
|
|
|
|
password: string,
|
|
|
|
options?: SecureOptions
|
2018-02-25 14:55:17 +00:00
|
|
|
): Promise<boolean>;
|
|
|
|
|
|
|
|
function getSecurePassword(
|
2018-02-25 18:20:49 +00:00
|
|
|
options?: SecureOptions
|
2018-02-25 14:55:17 +00:00
|
|
|
): Promise<boolean | {service: string, username: string, password: string}>;
|
|
|
|
|
2016-10-27 08:58:02 +00:00
|
|
|
function setInternetCredentials(
|
|
|
|
server: string,
|
|
|
|
username: string,
|
2017-01-10 22:07:11 +00:00
|
|
|
password: string
|
2016-10-27 08:58:02 +00:00
|
|
|
): Promise<void>;
|
|
|
|
|
|
|
|
function getInternetCredentials(
|
2017-01-10 22:07:11 +00:00
|
|
|
server: string
|
2016-10-27 08:58:02 +00:00
|
|
|
): Promise<UserCredentials>;
|
|
|
|
|
|
|
|
function resetInternetCredentials(
|
2017-01-10 22:07:11 +00:00
|
|
|
server: string
|
2016-10-27 08:58:02 +00:00
|
|
|
): Promise<void>;
|
|
|
|
|
|
|
|
function setGenericPassword(
|
|
|
|
username: string,
|
|
|
|
password: string,
|
2017-01-10 22:07:11 +00:00
|
|
|
service?: string
|
2017-03-17 19:59:35 +00:00
|
|
|
): Promise<boolean>;
|
2016-10-27 08:58:02 +00:00
|
|
|
|
2017-01-10 22:07:11 +00:00
|
|
|
function getGenericPassword(
|
|
|
|
service?: string
|
2017-03-17 19:59:35 +00:00
|
|
|
): Promise<boolean | {service: string, username: string, password: string}>;
|
|
|
|
|
|
|
|
function resetGenericPassword(
|
|
|
|
service?: string
|
|
|
|
): Promise<boolean>
|
2016-10-27 08:58:02 +00:00
|
|
|
|
2017-01-10 22:07:11 +00:00
|
|
|
function requestSharedWebCredentials (
|
|
|
|
): Promise<SharedWebCredentials>;
|
2016-10-27 08:58:02 +00:00
|
|
|
|
2017-01-10 22:07:11 +00:00
|
|
|
function setSharedWebCredentials(
|
|
|
|
server: string,
|
|
|
|
username: string,
|
|
|
|
password: string
|
|
|
|
): Promise<void>;
|
2016-10-27 08:58:02 +00:00
|
|
|
|
|
|
|
}
|