Integration of the Common ASM
  • 24 Oct 2024
  • 3 Minutes à lire
  • Sombre
    Lumière

Integration of the Common ASM

  • Sombre
    Lumière

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

Integration of the Common ASM—Customization of the Transaction ScreenAndroidiOS

Integration of the Common ASM—Customization of the Transaction Screen

The Common ASM is not an independent ASM but part of the following ASMs:

  • Presence ASM

  • User Input ASM

  • Native Biometric Authentication ASM

One of the crucial features of the Common ASM is to provide a transaction screen to the authenticator. This transaction screen displays the transaction text at the top of the screen, with a font adapted to the screen resolution. The text is centered horizontally, and it is possible to scroll the text if required.

Two buttons are displayed: the approval button on the right and the cancellation button on the left. These buttons are displayed at the bottom of the screen and are always visible.

Android

Dependencies

To be able to use the Common ASM, you have to link it and its dependencies to a project. Use the following code to configure these dependencies in your application’s module build.gradle file:

repositories {
     google()
     maven({ url '<path to your repository>' })
}
dependencies {
     api files ('<path to library>/FIDOUAFCommonASM.aar')
     api "com.noknok:ak_uaf:<current NokNok Android version>"
     api "com.noknok:asmsdk_uaf:<current NokNok Android version>"
     api files ('<path to library>/DeviceBindingSDK.aar')
     api files ('<path to library>/SecureStorageSDK.aar')
     api files ('<path to library>/UtilitiesSDK.aar')
     api "com.google.android.material:material:1.4.0"
     api "androidx.annotation:annotation:1.2.0"
}

The local maven repository is included in the FIDO UAF SDK package and located at

NokNok/App SDKs/Android/Version current Android version/app_dev_and_eval_current Android version/AppSDK/android-studio/m2repository.

The Device Binding SDK, Secure Storage SDK, and Utilities SDK are included in the OneSpan Mobile Security Suite product package.

For more details how to integrate Secure Storage SDK, refer to the Secure Storage SDK Integration Guide.

Customization

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

Tutorial App—Transaction Screen on an Android Device

Strings

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

Tutorial App Transaction Screen—Customization Strings

Key

Default text

Description

vds_asm_common_transaction_button_approve_text

Approve

Text for approval button

vds_asm_common_transaction_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.

Tutorial App Transaction Screen Customization—Colors

Key

Default text

Description

vds_asm_common_transaction_text_color

#ff000000

Text color for transaction

vds_asm_common_transaction_background_color

#ffffffff

Background color for transaction screen

vds_asm_common_transaction_button_approve_text_color

#ff000000

Text color for approval button

vds_asm_common_transaction_button_approve_background_color

#ffd3d3d3

Background color for approval button

vds_asm_common_transaction_button_cancel_text_color

#ff000000

Text color for cancel button

vds_asm_common_transaction_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.

Tutorial App Transaction Screen Customization—Dimensions

Key

Default text

Description

vds_asm_common_transaction_text_min_size

18sp

Text minimum size

vds_asm_common_transaction_text_max_size

30sp

Text maximum size

vds_asm_common_transaction_button_spacing_horizontal

16dp

Horizontal spacing between buttons

vds_asm_common_transaction_button_spacing_vertical

16dp

Vertical spacing above button section

vds_asm_common_transaction_screen_padding

16dp

Padding

vds_asm_common_transaction_buttons_horizontal_margin

0dp

Left and right margins for the button section

vds_asm_common_transaction_buttons_vertical_margin

0dp

Bottom margin for the content layout

vds_asm_common_transaction_text_text_size_granularity

2sp

Text size granularity for the text message

iOS

Dependencies

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

  • FIDOUAFCommonASM.xcframework (linked framework and libraries)

  • FIDOUAFCommonASMResources.bundle (linked framework and libraries)

  • MSSDeviceBinding.xcframework (embedded framework)

  • MSSSecureStorage.xcframework (linked framework and libraries)

  • UtilitiesSDK.xcframework (linked framework and libraries)

The MSSDeviceBinding, MSSSecureStorage and UtilitiesSDK frameworks are included in the OneSpan Mobile Security Suite product package.

MSSDeviceBinding and MSSSecureStorage frameworks must be set to Embed & Sign in your Xcode project or there is a risk of your application terminating unexpectedly.

Customization

Tutorial App—Transaction Screen on an iOS device

Customization keys

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

Tutorial App Transaction Screen—Customization Keys

Key

Default text

Description

vds_asm_common_transaction_button_approve_text

Approve

Text for approval button

vds_asm_common_transaction_button_cancel_text

Cancel

Text for cancel button

vds_asm_common_transaction_text_color

#ff000000

Text color for transaction

vds_asm_common_transaction_background_color

#ffffffff

Background color for transaction screen

vds_asm_common_transaction_button_approve_text_color

#ff000000

Text color for approval button

vds_asm_common_transaction_button_approve_background_color

#ffd3d3d3

Background color for approval button

vds_asm_common_transaction_button_cancel_text_color

#ff000000

Text color for cancel button

vds_asm_common_transaction_button_cancel_background_color

#ffd3d3d3

Background color for cancel button

vds_asm_common_transaction_text_size_min

15

Text minimum size

vds_asm_common_transaction_text_size_max

30

Text maximum size

vds_asm_common_transaction_button_spacing_horizontal

20

Horizontal spacing between buttons

vds_asm_common_transaction_button_spacing_vertical

15

Vertical spacing above button section

vds_asm_common_transaction_screen_padding

15

Padding

Dark mode support

The Tutorial App is delivered with a storyboard called FIDO_UAF_Common.storyboard (see Tutorial App—Common Storyboard).

Modify this storyboard to customize fonts and colors. The Dark mode is managed by declaring 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_Common.storyboard in XCode

Tutorial App—Common 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 App Common Storyboard—Error Message) is displayed by default and does not indicate that the compilation has failed.

Tutorial App Common Storyboard—Error Message


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