refractor(android-fingerprint-auth): export options to interface

This commit is contained in:
Ibby 2016-12-06 08:33:03 -05:00
parent 6ba1d4908b
commit 585d4ff37b

View File

@ -1,4 +1,29 @@
import { Cordova, Plugin } from './plugin';
export interface AndroidFingerprintAuthOptions {
/**
* Used as the alias for your key in the Android Key Store.
*/
clientId: string;
/**
* Used to encrypt the token returned upon successful fingerprint authentication.
*/
clientSecret: string;
/**
* Set to true to remove the "USE BACKUP" button
*/
disableBackup?: boolean;
/**
* Change the language. (en_US or es)
*/
locale?: string
}
/**
* @name Android Fingerprint Auth
* @description
@ -28,6 +53,8 @@ import { Cordova, Plugin } from './plugin';
* })
* .catch(error => console.error(error));
* ```
* @interfaces
* AndroidFingerprintAuthOptions
*/
@Plugin({
pluginName: 'AndroidFingerprintAuth',
@ -39,27 +66,11 @@ export class AndroidFingerprintAuth {
/**
* Opens a native dialog fragment to use the device hardware fingerprint scanner to authenticate against fingerprints registered for the device.
* @param params {any}
* @param options {AndroidFingerprintAuthOptions} Options
* @returns {Promise<any>}
*/
@Cordova()
static show(params: {
/**
* Used as the alias for your key in the Android Key Store.
*/
clientId: string;
/**
* Used to encrypt the token returned upon successful fingerprint authentication.
*/
clientSecret: string;
/**
* Set to true to remove the "USE BACKUP" button
*/
disableBackup?: boolean;
/**
* Change the language. (en_US or es)
*/
locale?: string
}): Promise<{
static show(options: AndroidFingerprintAuthOptions): Promise<{
/**
* Base64 encoded string
*/