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

48 lines
1015 B
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;
}
function setInternetCredentials(
server: string,
username: string,
2017-01-10 22:07:11 +00:00
password: string
): 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,
2017-01-10 22:07:11 +00:00
service?: string
): Promise<void>;
2017-01-10 22:07:11 +00:00
function getGenericPassword(
service?: string
): Promise<void>;
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>;
}