react-native-keychain/typings/react-native-keychain.d.ts

68 lines
1.5 KiB
TypeScript
Raw Normal View History

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;
}
export interface Options {
accessControl?: string;
accessGroup?: string;
authenticationPrompt?: string;
authenticationType?: string;
service?: string;
}
function canImplyAuthentication(
options?: Options
): Promise<boolean>;
function getSupportedBiometryType(
): Promise<string>;
function setInternetCredentials(
server: string,
username: string,
password: string,
options?: Options
): Promise<void>;
function getInternetCredentials(
2017-01-10 22:07:11 +00:00
server: string
): Promise<UserCredentials>;
function resetInternetCredentials(
2017-01-10 22:07:11 +00:00
server: string
): Promise<void>;
function setGenericPassword(
username: string,
password: string,
options?: Options
2017-03-17 19:59:35 +00:00
): Promise<boolean>;
2017-01-10 22:07:11 +00:00
function getGenericPassword(
options?: Options
2017-03-17 19:59:35 +00:00
): Promise<boolean | {service: string, username: string, password: string}>;
function resetGenericPassword(
options?: Options
2017-03-17 19:59:35 +00:00
): Promise<boolean>
2017-01-10 22:07:11 +00:00
function requestSharedWebCredentials (
): Promise<SharedWebCredentials>;
2017-01-10 22:07:11 +00:00
function setSharedWebCredentials(
server: string,
username: string,
password: string
): Promise<void>;
}