- 23 Oct 2024
- 2 Minutes à lire
- SombreLumière
- PDF
Integrate notification
- Mis à jour le 23 Oct 2024
- 2 Minutes à lire
- SombreLumière
- PDF
Notification identifier registration
Notification identifier registration (overview)
To receive push notifications from the server, Mobile Authenticator Studio must first register its notification identifier. Mobile Authenticator Studio sends the notification identifier, which is associated with the authenticator serial and sequence numbers. The notification identifier association takes place directly after activating the authenticator, and each time the registration identifier changes in the course of the authenticator lifecycle.
The notification identifier is sent to the server as a Secure Channel information message and so need to be decrypted before being used to send push notifications.
Decrypting of the Secure Channel information message requires OneSpan Authentication Server Framework 3.14.1.1.
For more information about decrypting Secure Channel information messages, refer to the OneSpan Authentication Server Framework Programmer's Guide.
Register notification identifier request
The request sent by Mobile Authenticator Studio is configured in the NotificationRegistration section of the configuration file:
<!—- Notification Registration -->
<NotificationRegistration>
<URL method="POST"value="http://MY_DOMAIN_NAME/MY_WEB_SERVICE?serialNumber=%_ SerialNumber_%&sequenceNumber=%_ SequenceNumber_%&vascoNotificationIdentifier=%_ VascoNotificationIdentifier_%" />
</NotificationRegistration>
The URL can use the HTTP POST or GET methods. For more information about URL customization, refer to the Mobile Authenticator Studio Customization Guide.
Parameter name | Description |
---|---|
serialNumber | The authenticator serial number. Format: Alphanumeric string of 10 characters |
sequenceNumber | The sequence number of the authenticator instance/account. Format: Numeric string of 2 characters |
vascoNotificationIdentifier | The notification identifier encrypted as a Secure Channel information message. |
version | The version of the application binary as defined when configuring the app. |
Register notification identifier response
The response expected by Mobile Authenticator Studio must be formatted as described in the DTD:
<!ELEMENT DP4Mobile>
<!ATTLIST DP4Mobile retCode CDATA #REQUIRED>
<!ATTLIST DP4Mobile message CDATA #REQUIRED>
<!ATTLIST DP4Mobile serverTime CDATA #IMPLIED>
Example
<?xml version="1.0"encoding="UTF-8"?>
<DP4Mobile retCode="0"message="Operation Successful" />
Attribute name | Description |
---|---|
//DP4Mobile/@retCode | Required. The return code associated with the notification identifier registration request. 0 means success, any other value will cause the message attribute value to be displayed and the register notification identifier request to be relaunched. |
//DP4Mobile/@message | Required. The return message associated with the notification identifier registration request. This value will be displayed by the app if not 0. |
//DP4Mobile/@serverTime | Optional. This is the current server GMT time. This value will be used by the app to silently set the drift between device and server time to keep the app synchronized. |
Notification management
The notifications must have a specific format to be correctly used by the app. The content of the notifications must be a concatenation of the following elements:
A version tag, set to 01.
The serial number of the authenticator instance/account to use.
The number of the authenticator instance/account to use. The sequence number values range from 01 to 99.
The identifier of the transaction data signing or Secure Channel action that will be started when the user selects the notification.
01VDS100000000tds
When a notification is received while the app is open, a notification icon is displayed in the top right corner of the app display. The user can open the notification by clicking on the icon. If there are several pending notifications, a notification list is displayed to allow the user to choose which notification to open.
When a notification is received while the app is closing, and the user taps on it on the phone's notification bar, the corresponding notification will be directly opened in the app.
All received notifications are stored in the app, and will appear as pending notifications inside the app as long as they are dealt with.