Package | com.myflashlab.air.extensions.localAuth |
Class | public class LocalAuth |
Inheritance | LocalAuth Object |
Property | Defined By | ||
---|---|---|---|
canCheckBiometrics : Boolean [static] [read-only]
Returns true if device is capable of checking biometrics
| LocalAuth | ||
listener : EventDispatcher [static] [read-only]
Use this property to listen to the events being dispatched by this ANE. | LocalAuth |
Method | Defined By | ||
---|---|---|---|
authenticateWithBiometrics($localizedReason:String, $useErrorDialogs:Boolean = true, $stickyAuth:Boolean = false, $androidSettings:AndroidAuthSettings = null, $iOSSettings:IOSAuthSettings = null):void [static]
Authenticates the user with biometrics available on the device. | LocalAuth | ||
getAvailableBiometrics():Array [static]
Returns an Array of enrolled biometrics. | LocalAuth | ||
init():void [static]
Initialize the ANE so you can start adding the listeners
| LocalAuth |
Constant | Defined By | ||
---|---|---|---|
EXTENSION_ID : String = com.myflashlab.air.extensions.localAuth [static] | LocalAuth | ||
VERSION : String = 1.0.0 [static] | LocalAuth |
canCheckBiometrics | property |
canCheckBiometrics:Boolean
[read-only] Returns true if device is capable of checking biometrics
public static function get canCheckBiometrics():Boolean
listener | property |
listener:EventDispatcher
[read-only] Use this property to listen to the events being dispatched by this ANE.
public static function get listener():EventDispatcher
authenticateWithBiometrics | () | method |
public static function authenticateWithBiometrics($localizedReason:String, $useErrorDialogs:Boolean = true, $stickyAuth:Boolean = false, $androidSettings:AndroidAuthSettings = null, $iOSSettings:IOSAuthSettings = null):void
Authenticates the user with biometrics available on the device. You should be listening to
LocalAuthEvents.AUTHENTICATION
and LocalAuthEvents.ERROR
events to get the results.
Parameters
$localizedReason:String — The message to show to user while prompting them for authentication. This is
typically along the lines of: 'Please scan your finger to access MyApp.'
| |
$useErrorDialogs:Boolean (default = true ) — true means the system will attempt to handle user fixable issues encountered while
authenticating. For instance, if fingerprint reader exists on the phone but there's no fingerprint registered,
the plugin will attempt to take the user to settings to add one. Anything that is not user fixable, such as no
biometric sensor on device, will be returned as an error.
| |
$stickyAuth:Boolean (default = false ) — used when the application goes into background for any reason while the
authentication is in progress. Due to security reasons, the authentication has to be stopped at that time.
If stickyAuth is set to true, authentication resumes when the app is resumed. If it is set to false (default),
then as soon as app is paused a failure message is sent back to AIR and it is up to the client app to restart
authentication or do something else.
| |
$androidSettings:AndroidAuthSettings (default = null ) — Initialize an instance of AndroidAuthSettings class to customize messages in the dialogs
| |
$iOSSettings:IOSAuthSettings (default = null ) — Initialize an instance of IOSAuthSettings class to customize messages in the dialogs
|
getAvailableBiometrics | () | method |
public static function getAvailableBiometrics():Array
Returns an Array of enrolled biometrics.
ReturnsArray — |
init | () | method |
public static function init():void
Initialize the ANE so you can start adding the listeners
EXTENSION_ID | Constant |
public static const EXTENSION_ID:String = com.myflashlab.air.extensions.localAuth
VERSION | Constant |
public static const VERSION:String = 1.0.0