Skip to content

Commit

Permalink
Merge branch 'develop' into releases/1.8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
kober32 committed Dec 15, 2023
2 parents e0955bc + ea46b73 commit cdca3c0
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ All sources are licensed using the Apache 2.0 license. You can use them with no

## Contact

If you need any assistance, do not hesitate to drop us a line at [[email protected]](mailto:[email protected]) or our official [gitter.im/wultra](https://gitter.im/wultra) channel.
If you need any assistance, do not hesitate to drop us a line at [[email protected]](mailto:[email protected]) or our official [wultra.com/discord](https://wultra.com/discord) channel.

### Security Disclosure

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
)
}
}
Expand All @@ -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
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ class WMTOperationsImpl<T: WMTUserOperation>: 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
Expand Down
6 changes: 3 additions & 3 deletions docs/Using-Operations-Service.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
```

Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit cdca3c0

Please sign in to comment.