The Presence ASM can optionally be included in your app.

This ASM requests the approval of the user for FIDO operations. It displays a text to inform the user about the current FIDO operation and provides Approve and Cancel buttons.

Dependencies

To integrate this ASM, first add the Common ASM to your application’s module build.gradle file. See Dependencies for more information about the Common ASM Android dependencies.

Next, add the Presence ASM artifact. After you added this, the build.gradle file should look like this:

dependencies {
  // CommonASM and its dependencies
  api files(‘path to library/FIDOUAFPresenceASM.aar’)
}

Descriptor and metadata

  • Add the following line to the descriptorclass array in your res/raw/asmdescriptors.json file:

com.vasco.fido.uaf.asm.presence.PresenceASMDescriptor

See Embedding an authenticator for more details.

The ASM is delivered with the following metadata files for Android:

  • BD51#0000 (secure hardware protected devices with ECDSA)
  • BD51#0002 (software protected devices with ECDSA)

Customization

You can omit the customization of the ASM—this is an optional feature of the FIDO Authentication Solution!

You can use the Android XML system to customize the ASM.

To facilitate the customization, you can use the default resources from the package (FIDO UAF SDK /Android/Presence ASM/Values).

Presence ASM—Registration shows the customized registration screen on an Android device.

Presence ASM—Registration

Strings

The following raw string values can be customized via the strings.xml file:

Presence ASM Customization—Strings
Key Default text Description
vds_asm_presence_text_title Presence Authenticator Title
vds_asm_presence_text_description This authenticator prompts you to verify your presence by tapping a button on the device. Description
vds_asm_presence_text_registration Do you want to approve this registration request? Text for registration
vds_asm_presence_text_authentication Do you want to approve this authentication request? Text for authentication
vds_asm_presence_button_approve_text Approve Text for approval button
vds_asm_presence_button_cancel_text Cancel Text for cancel button

Colors

The following colors in #argb and #rgb hex format can be customized via the colors.xml file.

Presence ASM Customization—Colors
Key Default text Description
vds_asm_presence_text_color #ff000000 Text color
vds_asm_presence_background_color #ffffffff Background color
vds_asm_presence_button_approve_text_color #ff000000 Text color for approval button
vds_asm_presence_button_approve_background_color #ffd3d3d3 Background color for approval button
vds_asm_presence_button_cancel_text_color #ff000000 Text color for cancel button
vds_asm_presence_button_cancel_background_color #ffd3d3d3 Background color for cancel button

Dimensions

The following dimen-type dimensions with values like dp, px, or sp can be customized via the dimens.xml file.

Presence ASM Customization—Dimensions
Key Default text Description
vds_asm_presence_text_min_size 18sp Text minimum size
vds_asm_presence_text_max_size 30sp Text maximum size
vds_asm_presence_button_spacing_horizontal 16dp Horizontal spacing between buttons
vds_asm_presence_button_spacing_vertical 16dp Vertical spacing above button section
vds_asm_presence_screen_padding 16dp Padding
vds_asm_presence_buttons_horizontal_margin 0dp Left and right margins for the button section
vds_asm_presence_buttons_vertical_margin 0dp Bottom margin for the content layout
vds_asm_presence_text_text_size_granularity 2sp Text size granularity for the text message

Icon

You can customize the icon that is displayed when the user has to choose between authenticators. It depends on the following resource string:

  • vds_asm_presence_icon_drawable_name

The string value (by default vds_asm_presence_icon) corresponds to the name of a drawable resource, usually located in the drawable part of the Android resources system (e.g. res/drawable/vds_asm_presence_icon.png).

Presence Icon—Example

Dependencies

To integrate this ASM, add the following dependencies to your app:

  • All the Common ASM iOS dependencies as listed in Dependencies.
  • FIDOUAFPresenceASMResources.bundle (linked framework and libraries)
  • FIDOUAFPresenceASM.xcframework (linked framework and libraries)

Initialization and metadata

To integrate the Presence ASM with C++

  1. Add the import at the beginning of AppDelegate file:

    #import <FIDOUAFPresenceASM/FIDOPresenceASMInstanceCreator.hpp>

  2. Add the following lines to AppDelegate file in the didFinishLaunchingWithOptions: method:

    asmcore::ASMFactory::addAuthenticator
    (FIDOPresenceASMInstanceCreator::createInstance());

  3. See Embedding an authenticator for more details.

    The ASM is delivered with the following metadata file for iOS:

    • BD51#0003 (secure hardware protected devices with ECDSA)

To integrate the Presence ASM with Swift/Objective-C

  1. Add the import at the beginning of AppDelegate file:

    import FIDOUAFPresenceASM

  2. Add the following lines to AppDelegate file in the didFinishLaunchingWithOptions: method:

    // Add presence authenticator to ASM
    FIDOPresenceASM.registerPresenceAuthenticator()

  3. See Embedding an authenticator for more details.

    The ASM is delivered with the following metadata file for iOS:

    • BD51#0003 (secure hardware protected devices with ECDSA)

Customization

You can omit the customization of the ASM—this is an optional feature of the FIDO Authentication Solution!

You can use the iOS Localizable.strings to customize the ASM. Presence ASM—Registration shows the customized registration screen on an iOS device.

Presence ASM—Registration

Customization keys

The following keys are available for the customization of this authenticator:

Presence ASM—Customization Keys
Key Default text Description
vds_asm_presence_text_title Presence Authenticator Title Presence Authenticator
vds_asm_presence_text_description This authenticator prompts you to verify your presence by tapping a button on the device. Description
vds_asm_presence_text_registration Do you want to approve this registration request? Text for registration
vds_asm_presence_text_authentication Do you want to approve this authentication request? Text for authentication
vds_asm_presence_button_approve_text Approve Text for approval button
vds_asm_presence_button_cancel_text Cancel Text for cancel button
vds_asm_presence_text_color #ff000000 Text color
vds_asm_presence_background_color #ffffffff Background color
vds_asm_presence_button_approve_text_color #ff000000 Text color for approval button
vds_asm_presence_button_approve_background_color #ffd3d3d3 Background color for approval button
vds_asm_presence_button_cancel_text_color #ff000000 Text color for cancel button
vds_asm_presence_button_cancel_background_color #ffd3d3d3 Background color for cancel button
vds_asm_presence_text_size_min 18 Text minimum size
vds_asm_presence_text_size_max 30 Text maximum size
vds_asm_presence_button_spacing_horizontal 16 Horizontal spacing between buttons
vds_asm_presence_button_spacing_vertical 16 Vertical spacing above button section
vds_asm_presence_screen_padding 16 Padding

Icon

You can customize the icon that is displayed when the user has to choose between authenticators. It depends on the following resource string:

  • vds_asm_presence_icon

The string value (by default presence_icon) corresponds to the name of a drawable resource, usually located in the binary (e.g. presence_icon.png).

Presence Icon—Example

Dark mode support

The Tutorial App is delivered with a storyboard called FIDO_UAF_PresenceASM.storyboard (see Tutorial App—FIDO UAF Presence ASM Storyboard).

Modify this storyboard to customize fonts and colors. To manage the Dark mode, declare named colors in the Assets catalog Images.xcassets. The storyboard takes over the string customization of colors as soon as it is added in the integrating project.

This feature requires iOS 11 or later.

FIDO_UAF_PresenceASM.storyboard in XCode

Tutorial AppFIDO UAF Presence ASM Storyboard

This storyboard contains several links to outlets that are defined inside the FIDOUAFCommonASM.xcframework. These links cannot be restored if they are removed.

The error in the storyboard (see Tutorial AppFIDO UAF Presence ASM Storyboard—Error Message) is displayed by default and does not indicate that the compilation has failed.

Tutorial AppFIDO UAF Presence ASM Storyboard—Error Message