Skip to content

Commit

Permalink
Replace timestampRequested and timestampSigned with `timestampR…
Browse files Browse the repository at this point in the history
…eceived ` and `timestampSent ` (#119)
  • Loading branch information
Hopsaheysa authored Dec 13, 2023
1 parent b7e6bdc commit 9318a47
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions docs/Using-Operations-Service.md
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ class ProximityCheck {
val type: ProximityCheckType

/** Timestamp when the operation was scanned (QR Code) or delivered to the device (Deeplink) */
val timestampRequested: ZonedDateTime = ZonedDateTime.now()
val timestampReceived: ZonedDateTime = ZonedDateTime.now()
}
```

Expand Down Expand Up @@ -556,10 +556,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 `ProximityCheckType.QR_CODE` or `ProximityCheckType.DEEPLINK`.
- `timestampRequested`: The timestamp when the QR code was scanned (by default, it is created as the current timestamp when the object is instantiated).
- `timestampReceived`: The timestamp when the QR code was scanned (by default, it is created as the current timestamp when the object is instantiated).

- Authorizing the ProximityCheck
When authorizing, the SDK will by default add `timestampSigned` to the `ProximityCheck` object. This timestamp indicates when the operation was signed.
When authorizing, the SDK will by default add `timestampSent` to the `ProximityCheck` object. This timestamp indicates when the operation was sent.

### PACUtils
- 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
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ internal data class AuthorizeRequestObject(
val proximityCheck: ProximityCheckData? = null
) {

constructor(operation: IOperation, timestampSigned: ZonedDateTime = ZonedDateTime.now()): this(
constructor(operation: IOperation, timestampSent: ZonedDateTime = ZonedDateTime.now()): this(
operation.id,
operation.data,
operation.proximityCheck?.let {
ProximityCheckData(
it.totp,
it.type,
it.timestampRequested,
timestampSigned
it.timestampReceived,
timestampSent
)
}
)
Expand All @@ -61,11 +61,11 @@ internal data class ProximityCheckData(
@SerializedName("type")
val type: ProximityCheckType,

/** Timestamp when the operation was delivered to the app */
@SerializedName("timestampRequested")
val timestampRequested: ZonedDateTime,
/** Timestamp when the operation was received by the */
@SerializedName("timestampReceived")
val timestampReceived: ZonedDateTime,

/** Timestamp when the operation was signed */
@SerializedName("timestampSigned")
val timestampSigned: ZonedDateTime
/** Timestamp when the operation was sent */
@SerializedName("timestampSent")
val timestampSent: ZonedDateTime
)
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ data class ProximityCheck(
val type: ProximityCheckType,

/** Timestamp when the operation was scanned (qrCode) or delivered to the device (deeplink) */
val timestampRequested: ZonedDateTime = ZonedDateTime.now()
val timestampReceived: ZonedDateTime = ZonedDateTime.now()
)

/**
Expand Down

0 comments on commit 9318a47

Please sign in to comment.