Skip to content

pin-authentication / io.matthewnelson.pin_authentication.service / PinAuthentication / Controller

Controller

class Controller (source)

PUBLIC methods to be utilized by the Application that’s implementing PinAuthentication to access core features.

Constructors

Name Summary
<init> PUBLIC methods to be utilized by the Application that’s implementing PinAuthentication to access core features.Controller()

Functions

Name Summary
clearPinAuthenticationData Clears data associated with PinAuthentication from SharedPreferences, and EncryptedSharedPreferences.fun clearPinAuthenticationData():Unit
completeOnBoardProcess Declares the on-board process as being complete, and if Pin Security is:fun completeOnBoardProcess():Unit
hasInitialAppLoginBeenSatisfied Returns a boolean value that will change from false to true, and stay true until the application is terminated.fun hasInitialAppLoginBeenSatisfied(): LiveData<Boolean>
hasOnBoardProcessBeenSatisfied Returns TRUE if:fun hasOnBoardProcessBeenSatisfied():Boolean
hasPostLoginProcessBeenStarted Check if your startup process has previously been started.fun hasPostLoginProcessBeenStarted():Boolean
isPinSecurityEnabled See registerPinConfirmationToProceedRequestKey sample code.fun isPinSecurityEnabled():Boolean
postLoginProcessStarted After Controller.hasPostLoginProcessBeenStarted returns false and your one-time processes start, use this method to set the value to true so that your post login processes won’t be executed again if the observer on Controller.hasInitialAppLoginBeenSatisfied gets proc’d again.fun postLoginProcessStarted():Unit
registerPinConfirmationToProceedRequestKey Register request keys.fun registerPinConfirmationToProceedRequestKey(activity:Activity, requestKey:String): LiveData<Boolean>?
Adds a requestKey to ConfirmPinToProceed.mapRequestKeys and returns LiveData associated with it which will change after calling Controller.requestPinConfirmationToProceed depending on whether or not the User enters the correct pin.fun registerPinConfirmationToProceedRequestKey(fragment: Fragment, requestKey:String): LiveData<Boolean>?
requestPinConfirmationToProceed To be used after registering the requestKey via Controller.registerPinConfirmationToProceedRequestKey.fun requestPinConfirmationToProceed(requestKey:String):Unit
resetPinConfirmationToProceedRequestKey Reset the boolean value associated with the requestKey to false to proc the observer that is setup on the Controller.registerPinConfirmationToProceedRequestKey method.fun resetPinConfirmationToProceedRequestKey(requestKey:String):Unit
unregisterPinConfirmationToProceedRequestKey Remove registered request key.fun unregisterPinConfirmationToProceedRequestKey(requestKey:String):Unit
Removes the requestKey and LiveData values from the Map contained in ConfirmPinToProceed.mapRequestKeys.fun unregisterPinConfirmationToProceedRequestKey(requestKeys:Array<String>):Unit