mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
refractor(android-fingerprint-auth): export options to interface
This commit is contained in:
parent
6ba1d4908b
commit
585d4ff37b
@ -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
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user