Integration of the FIDO ASMs on Android
  • 04 Dec 2024
  • 2 Minutes à lire
  • Sombre
    Lumière
  • PDF

Integration of the FIDO ASMs on Android

  • Sombre
    Lumière
  • PDF

The content is currently unavailable in French. You are viewing the default English version.
Résumé de l’article

Before you integrate the FIDO ASM with the Tutorial App Plus application on iOS and/or Android, ensure that the FIDO Server has been configured correctly. For more information, see Configuration of the FIDO Server and the NokNok Labs documentation.

Configuration steps

To integrate the OneSpanFIDO ASMs on Android with the Tutorial App Plus application

  1. Make sure that the value for minSdkVersion (which you can find in the main build.gradle file) of the Tutorial App Plus is equal to or higher than the value for minSdkVersion of the ASMs—see Supported platforms.

  2. Make the following changes to the gradle file:

    1. Navigate to project>root>build.gradle and change the classpath from 'com.android.tools.build:gradle:4.0.1' to 'com.android.tools.build:gradle:8.2.2'.

    2. Navigate to gradle.properties and change 'android.jetifier.blacklist = pass-1.2.2' to 'android.jetifier.ignorelist = pass-1.2.2'.

    3. Navigate to app>build.gradle and add the namespace' com.noknok.android.tutorialappplus' in android{}.

  3. Change the gradle-wrapper.properties file to use gradle 6.1.1:

    distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip

  4. Change the gradle to use Java 11:
    In Android Studio, go to File>Settings>Build, Execution, Deployment>Build Tools>Gradle and select Java 11 (or JDK 11).

  5. Copy the ASM libraries (.aar files) and their dependencies to a directory in the Tutorial App, e.g. app/libs.

  6. Integrate the Presence ASM in your app—see Integration of the Presence ASM for more detailed information.

  7. Integrate the User Input ASM (PIN/password) in your app—see Integration of the User Input ASM for more detailed information.

  8. Integrate the Native Biometric Authentication ASM—see Integration of the Native Biometric Authentication ASM for more detailed information.

  9. (OPTIONAL) Embed an authenticator—see Embedding of an authenticator for more detailed information.

  10. After the integration of the FIDO ASMs is completed, raw/asmdescriptors.json should look like this:

    { 					
      	"descriptorclass":[					
      "com.vasco.fido.uaf.asm.biometric.NativeBiometricAuthenticationASMDescriptor",
      "com.vasco.fido.uaf.asm.presence.PresenceASMDescriptor",  				
      "com.vasco.fido.uaf.asm.userinput.PinASMDescriptor",					
      "com.vasco.fido.uaf.asm.userinput.PasswordASMDescriptor" 					
      ] 					
    }  
  11. Configure your server endpoint in the TutorialApp class: modify the host variable:

    public static final String host = "https://<your endpoint>";

  12. In build.gradle, add the following inside the android{} block:

    packagingOptions {
    exclude 'META-INF/lib_release.kotlin_module'
    }
  13. In app/build.gradle, remove the line dependency 'api "com.noknok:asm_spass2:7.0.2-326"' and add the following lines inside dependencies{} block:

    constraints { 
      implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") { 
        because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib") 
      }  					
      implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0") { 					
        because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib") 					
      }
    }  					
    api files('libs/FIDOUAFCommonASM.aar') 					
    api files('libs/FIDOUAFNativeBiometricAuthenticationASM.aar') 					
    api files('libs/FIDOUAFPresenceASM.aar') 					
    api files('libs/FIDOUAFUserInputASM.aar') 					
    api files('libs/BiometricSensorSDK.aar') 					
    api files('libs/DeviceBindingSDK.aar') 					
    api files('libs/SecureStorageSDK.aar') 					
    api files('libs/UtilitiesSDK.aar') 					
    api "androidx.biometric:biometric:1.1.0" 					
    api "androidx.constraintlayout:constraintlayout:2.0.4"
    implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
  14. Customize the transaction screen—Common ASM; see Integration of the Common ASM—Customization of the Transaction Screen for more detailed information.

  15. Customize the anti-hammering protection; see Customization of the Anti-hammering Protection for more detailed information.

  16. When working with Android version 14 (API level 34) and later, make the following changes in the application:

    1. Replace all instances of 'switch' with 'if else'.

    2. Navigate to TutorialPlusSuggestionUI.java class and change line 34: replace 'builder.setMessage(R.string.nnl_appsdk_plus_use_platform_authenticator);' with 'builder.setMessage(com.noknok.android.client.appsdk_plus.R.string.nnl_appsdk_plus_use_platform_authenticator);'.

    3. Add android:exported = 'true' where needed.

    4. In android>AndroidManifest, add '<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>'.

    5. Navigate to app build.gradle and change the api from 'net.openid:appauth:0.6.0' to 'net.openid:appauth:0.7.0'

    6. Navigate to android>AndroidManifest.xml and add the following:

      • <receiver android:name="com.huawei.hms.support.api.push.PushMsgReceiver" android:exported="true"/>

      • <receiver android:name="com.huawei.hms.support.api.push.PushReceiver" android:exported="true"/>

    7. In app build.gradle, remove 'com.noknok:asm_spass2:7.0.2-326'.

  17. Run the Tutorial App Plus application.


Cet article vous a-t-il été utile ?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.
ESC

Ozzy, facilitant la découverte de connaissances grâce à l’intelligence conversationnelle