- 24 Oct 2024
- 4 Minutes to read
- DarkLight
Exposed APIs of the Orchestration SDK: Authentication Method
- Updated on 24 Oct 2024
- 4 Minutes to read
- DarkLight
Customization of integrated authentication
The texts related to the authentication methods can be customized using the keys listed in Virtual keypad - Text customization keys in the configuration files of the Customer Mobile Application (i.e. string.xml for Android and Localizable.strings for iOS).
Virtual keypad - Text customization keys | ||
Key | Default value | Description |
---|---|---|
orch_pinpad_text_registration | Choose a password | Registration text |
orch_pinpad_text_registration_confirm | Confirm your password | Confirmation text during registration |
orch_pinpad_text_authentication | Enter your password | Text for authentication |
orch_pinpad_text_update | Choose a new password | Text for updating the password |
orch_pinpad_text_update_confirmation | Confirm new password | Text for confirming the updated password |
orch_pinpad_error_weak | The password is too simple. Choose a more complex password. | Weak password error |
orch_pinpad_error_confirmation | The password confirmation has failed. Make sure you entered the same password twice. | Password confirmation error |
Biometric recognition | |
Key | Default value |
---|---|
orch_biometric_title | Biometric Authentication |
orch_biometric_description | Please, use your Biometric scanner to authenticate |
orch_biometric_failed | Authentication failed |
orch_biometric_btn_cancel | Cancel |
The color can be customized using the keys listed in Virtual keypad - Color customization keys in the configuration files of the Customer Mobile Application (i.e. color.xml for Android and Localizable.strings for iOS).
Virtual keypad - Color customization keys | ||
Key | Default value | Description |
---|---|---|
orch_pinpad_background_color | #ffffffff | Background color |
orch_pinpad_arrow_color | #ffffc107 | Delete arrow color |
orch_pinpad_input_color | #ffffc107 | Secure input color |
orch_pinpad_text_color | #ff000000 | Title color |
orch_pinpad_text_error_color | #ffff0000 | Text error color |
orch_pinpad_digit_color | #ff000000 | Color of the Virtual keypad digits |
The font size can be customized using the keys listed in Virtual keypad - Font size customization keys in the configuration files of the Customer Mobile Application (i.e. dimens.xml for Android and Localizable.strings for iOS).
Virtual keypad - Font size customization keys | |||
Key | Android Default value | iOS Default value | Description |
---|---|---|---|
orch_pinpad_input_empty_size | N/A | 15 | Secure input inactive font size, only on iOS |
orch_pinpad_input_full_size | N/A | 20 | Secure input active font size, only on iOS |
orch_pinpad_title_text_size | 20sp | 25 | Title font size |
orch_pinpad_text_error_size | 18sp | 16 | Text error font size |
orch_pinpad_digit_text_size | 40sp | 50 | Font size of the Virtual keypad digits |
The other graphical elements are defined differently on iOS and Android.
For iOS, you can define these by customizing the keys listed in Virtual keypad - Graphical elements customization keys for iOS in the configuration files of the Customer Mobile Application (i.e. Localizable.strings).
Virtual keypad - Graphical elements customization keys for iOS | ||
Key | Default value | Description |
---|---|---|
orch_pinpad_background_image | Background image (can be empty) | |
orch_pinpad_background_mode | fit | Background image display mode. Possible values:
|
orch_pinpad_arrow_image | backspace | Delete arrow image |
orch_pinpad_input_font_name | Secure input font (System if empty) | |
orch_pinpad_input_empty_character | □ | Secure input empty character |
orch_pinpad_input_full_character | ■ | Secure input full character |
orch_pinpad_text_font_name | HelveticaNeue-Light | Title font name |
orch_pinpad_text_error_font_name | HelveticaNeue | Text error font name |
orch_pinpad_digit_font_name | HelveticaNeue-UltraLight | Font name of the Virtual keypad digits |
For Android, the font can be customized by overriding the styles listed in Virtual keypad - Font customization for Android in the configuration files of the Customer Mobile Application (i.e. styles.xml).
Virtual keypad - Font customization for Android | ||
Style | Default font family name | Description |
---|---|---|
PinpadTitleFont | sans-serif-thin | Title font style |
PinpadErrorFont | sans-serif-thin | Text error font style |
PinpadDigitFont | sans-serif-thin | Font style of the Virtual keypad digits |
For Android, the secure input and the backspace arrow can be customized by overriding the drawable elements listed in Virtual keypad - Drawable element customization for Android in the configuration files of the Customer Mobile Application (i.e. in the drawable folder).
Virtual keypad - Drawable element customization for Android | |
Drawable | Description |
---|---|
orch_pinpad_backspace.xml | Delete arrow drawable |
orch_pinpad_clue_activated.xml | Secure input full drawable |
orch_pinpad_clue_deactivated.xml | Secure input empty drawable |
orch_pinpad_clue_highlighted.xml | Secure input highlighted drawable |
orch_pinpad_background_image.xml | Virtual keypad background drawable, can be overridden by an image. |
For Android, the Virtual keypad background can be customized in multiple ways:
by changing its background color, as indicated in the Virtual keypad color table
by overriding its background image, as indicated in the Virtual keypad drawable table
by overriding its layout in the configuration files of the Customer Mobile Application (i.e. in the layout folder)
Virtual keypad - Background customization for Android | |
Layout | Description |
---|---|
orch_pinpad_background_layout.xml | Layout of the Virtual keypad background; the background image can be changed by using the android:src key. |
Dark mode support for iOS
In the iOS sample, a file named PinPad.storyboard is available.
This file makes it possible to customize fonts, icon and colors. The Dark mode is managed by declaring named colors in the assets catalog (Assets.xcassets) or by using system colors.
The storyboard will take over the string customization as soon as it is added to the integrating project.
This storyboard contains a lot of links to outlets defined inside the OrchestrationSDK. These links can't be restored if they are removed.
The error you see in the storyboard is perfectly normal and doesn't make the compilation fail.
External user authentication
We also provide an option to override the user authentication. For example instead of displaying the integrated Virtual keypad, you can display your own password authentication.
The Customer Mobile Application must call the setUserAuthenticationCallback method and provide:
an implementation of the UserAuthenticationCallback interface that will be called when an overridden user authentication is required.
a list of UserAuthenticationType containing all the user authentication you want to override. For now only the UserAuthenticationType.PASSWORD can be overridden.
The UserAuthenticationCallback interface is used by the Orchestration SDK Client to interact with the Customer Mobile Application during the process of overridding the user authentication. It exposes the following methods:
onUserAuthenticationRequired. Called when the Orchestration SDK Client needs the UserAuthenticationCallback object to authenticate the end user.
The Customer Mobile Application must call the onUserAuthenticationInputSuccess method of the UserAuthenticationInputCallback object if the user is authenticated. An input from the user is expected, it may be used to derive the secret store in the device.
The Customer Mobile Application must call the onUserAuthenticationInputAborted method of the UserAuthenticationInputCallback object if the user aborts the user authentification.
onUserAuthenticationInputError. This is called when the Orchestration SDK Client needs to inform the UserAuthenticationCallback method that there is an issue with the input.
For iOS, different names are used: UserAuthenticationCallback is called UserAuthenticationDelegate, and UserAuthenticationInputCallback is called UserAuthenticationInputDelegate.
For more information about this feature, see Authentication methods.