diff --git a/WultraMobileTokenSDK/Operations/Model/Requests/WMTAuthorizationData.swift b/WultraMobileTokenSDK/Operations/Model/Requests/WMTAuthorizationData.swift index 9c3e48b..ab64089 100644 --- a/WultraMobileTokenSDK/Operations/Model/Requests/WMTAuthorizationData.swift +++ b/WultraMobileTokenSDK/Operations/Model/Requests/WMTAuthorizationData.swift @@ -34,7 +34,7 @@ class WMTAuthorizationData: Codable { self.proximityCheck = proximityCheck } - init(operation: WMTOperation, timestampSigned: Date = Date()) { + init(operation: WMTOperation, timestampSent: Date = Date()) { self.id = operation.id self.data = operation.data @@ -46,8 +46,8 @@ class WMTAuthorizationData: Codable { self.proximityCheck = WMTProximityCheckData( otp: proximityCheck.totp, type: proximityCheck.type, - timestampRequested: proximityCheck.timestampRequested, - timestampSigned: timestampSigned + timestampReceived: proximityCheck.timestampReceived, + timestampSent: timestampSent ) } } @@ -62,8 +62,8 @@ struct WMTProximityCheckData: Codable { let type: WMTProximityCheckType /// Timestamp when the operation was delivered to the app - let timestampRequested: Date + let timestampReceived: Date /// Timestamp when the operation was signed - let timestampSigned: Date + let timestampSent: Date } diff --git a/WultraMobileTokenSDK/Operations/Model/UserOperation/WMTProximityCheck.swift b/WultraMobileTokenSDK/Operations/Model/UserOperation/WMTProximityCheck.swift index e05411e..6c23683 100644 --- a/WultraMobileTokenSDK/Operations/Model/UserOperation/WMTProximityCheck.swift +++ b/WultraMobileTokenSDK/Operations/Model/UserOperation/WMTProximityCheck.swift @@ -28,12 +28,12 @@ public class WMTProximityCheck: Codable { public let type: WMTProximityCheckType /// Timestamp when the operation was scanned (qrCode) or delivered to the device (deeplink) - public let timestampRequested: Date + public let timestampReceived: Date - public init(totp: String, type: WMTProximityCheckType, timestampRequested: Date = Date()) { + public init(totp: String, type: WMTProximityCheckType, timestampReceived: Date = Date()) { self.totp = totp self.type = type - self.timestampRequested = timestampRequested + self.timestampReceived = timestampReceived } } diff --git a/WultraMobileTokenSDK/Operations/Service/WMTOperationsImpl.swift b/WultraMobileTokenSDK/Operations/Service/WMTOperationsImpl.swift index 9a6d98a..83cea61 100644 --- a/WultraMobileTokenSDK/Operations/Service/WMTOperationsImpl.swift +++ b/WultraMobileTokenSDK/Operations/Service/WMTOperationsImpl.swift @@ -243,7 +243,7 @@ class WMTOperationsImpl: WMTOperations, WMTService { return nil } - let data = WMTAuthorizationData(operation: operation, timestampSigned: currentServerDate ?? Date()) + let data = WMTAuthorizationData(operation: operation, timestampSent: currentServerDate ?? Date()) return networking.post(data: .init(data), signedWith: authentication, to: WMTOperationEndpoints.Authorize.endpoint) { response, error in self.processResult(response: response, error: error) { result in diff --git a/docs/Using-Operations-Service.md b/docs/Using-Operations-Service.md index 1fa0006..ff2c551 100644 --- a/docs/Using-Operations-Service.md +++ b/docs/Using-Operations-Service.md @@ -515,7 +515,7 @@ public class WMTProximityCheck: Codable { /// Type of the Proximity check public let type: WMTProximityCheckType /// Timestamp when the operation was scanned (QR Code) or delivered to the device (Deeplink) - public let timestampRequested: Date + public let timestampReceived: Date } ``` @@ -617,10 +617,10 @@ When the app is launched via a deeplink, preserve the data from the deeplink and Once the QR code is scanned or match from the deeplink is found, create a `WMTProximityCheck` with: - `totp`: The actual Time-Based One-Time Password. - `type`: Set to `WMTProximityCheckType.qrCode` or `WMTProximityCheckType.deeplink`. - - `timestampRequested`: The timestamp when the QR code was scanned (by default, it is created as the current timestamp). + - `timestampReceived`: The timestamp when the QR code was scanned (by default, it is created as the current timestamp). - Authorizing the WMTProximityCheck -When authorization, the SDK will by default add `timestampSigned` to the `WMTProximityCheck` object. This timestamp indicates when the operation was signed. +When authorization, the SDK will by default add `timestampSent` to the `WMTProximityCheck` object. This timestamp indicates when the operation was signed. ### WMTPACUtils - For convenience, utility class for parsing and extracting data from QR codes and deeplinks used in the PAC (Proximity Anti-fraud Check), is provided.