Packagecom.myflashlab.air.extensions.localAuth
Classpublic class LocalAuth
InheritanceLocalAuth Inheritance Object

Authenticating the user identity locally.



Public Properties
 PropertyDefined 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
Public Methods
 MethodDefined 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
  
[static] Returns an Array of enrolled biometrics.
LocalAuth
  
init():void
[static] Initialize the ANE so you can start adding the listeners
LocalAuth
Public Constants
 ConstantDefined By
  EXTENSION_ID : String = com.myflashlab.air.extensions.localAuth
[static]
LocalAuth
  VERSION : String = 1.0.0
[static]
LocalAuth
Property Detail
canCheckBiometricsproperty
canCheckBiometrics:Boolean  [read-only]

Returns true if device is capable of checking biometrics


Implementation
    public static function get canCheckBiometrics():Boolean
listenerproperty 
listener:EventDispatcher  [read-only]

Use this property to listen to the events being dispatched by this ANE.


Implementation
    public static function get listener():EventDispatcher
Method Detail
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.

Returns
Array
init()method 
public static function init():void

Initialize the ANE so you can start adding the listeners

Constant Detail
EXTENSION_IDConstant
public static const EXTENSION_ID:String = com.myflashlab.air.extensions.localAuth

VERSIONConstant 
public static const VERSION:String = 1.0.0