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-26 11:31:06 +00:00
|
|
|
export interface Options {
|
2018-02-25 22:53:42 +00:00
|
|
|
accessControl?: string;
|
|
|
|
accessGroup?: string;
|
2018-02-25 22:42:15 +00:00
|
|
|
authenticationPrompt?: string;
|
2018-02-25 18:20:49 +00:00
|
|
|
authenticationType?: string;
|
2018-02-25 22:53:42 +00:00
|
|
|
service?: string;
|
2018-02-25 14:55:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function canImplyAuthentication(
|
2018-02-26 11:31:06 +00:00
|
|
|
options?: Options
|
2018-02-25 14:55:17 +00:00
|
|
|
): Promise<boolean>;
|
|
|
|
|
2018-02-25 18:23:36 +00:00
|
|
|
function getSupportedBiometryType(
|
|
|
|
): Promise<string>;
|
|
|
|
|
2016-10-27 08:58:02 +00:00
|
|
|
function setInternetCredentials(
|
|
|
|
server: string,
|
|
|
|
username: string,
|
2018-02-26 11:31:06 +00:00
|
|
|
password: string,
|
|
|
|
options?: Options
|
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,
|
2018-02-26 11:31:06 +00:00
|
|
|
options?: Options
|
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(
|
2018-02-26 11:31:06 +00:00
|
|
|
options?: Options
|
2017-03-17 19:59:35 +00:00
|
|
|
): Promise<boolean | {service: string, username: string, password: string}>;
|
|
|
|
|
|
|
|
function resetGenericPassword(
|
2018-02-26 11:31:06 +00:00
|
|
|
options?: Options
|
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 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
|
|
|
|
|
|
|
}
|