mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
feat(biometric-wrapper): add plugin (#3025)
This commit is contained in:
parent
a2fe674a3f
commit
c0b092b242
59
src/@ionic-native/plugins/biometric-wrapper/index.ts
Normal file
59
src/@ionic-native/plugins/biometric-wrapper/index.ts
Normal file
@ -0,0 +1,59 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name BiometricWrapper
|
||||
* @description
|
||||
* This plugin capture biometric(Iris and Fingerprint) and validate the user.
|
||||
* May be used in Banking domain
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { BiometricWrapper } from '@ionic-native/biometric-wrapper/ngx';
|
||||
*
|
||||
*
|
||||
* constructor(private biometricWrapper: BiometricWrapper) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.biometricWrapper.activateIris({'PID_XML': '<pid-xml/>'})
|
||||
* .then((res: any) => )
|
||||
* .catch((error: any) => );
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
|
||||
|
||||
@Plugin({
|
||||
pluginName: 'BiometricWrapper',
|
||||
plugin: 'cordova-plugin-biometric',
|
||||
pluginRef: 'cordova.plugins.BiometricWrapper',
|
||||
repo: '',
|
||||
install: '',
|
||||
installVariables: [],
|
||||
platforms: ['Android']
|
||||
})
|
||||
|
||||
@Injectable()
|
||||
export class BiometricWrapper extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* This function activate iris activity
|
||||
* @return {Promise<any>} Returns a promise that resolves when iris data captured
|
||||
*/
|
||||
@Cordova()
|
||||
activateIris(args: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function activate fingerprint activity
|
||||
* @return {Promise<any>} Returns a promise that resolves when FP data captured
|
||||
*/
|
||||
@Cordova()
|
||||
activateFingerprint(args: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user