Push-Definitions/Sources/PushAPI/DeviceDecision.swift

20 lines
618 B
Swift
Raw Normal View History

2022-06-05 11:47:58 +02:00
import Foundation
/**
A statement from the administrator to approve or reject a device for an application.
- Note: There is a potential security risk here: Capturing this message and retransmitting it to the `confirm` route can approve previously rejected devices if they register again with the same push token. A timestamp, counter, or nonce can prevent this.
*/
struct DeviceDecision {
/// The push token of the approved or rejected device.
let pushToken: PushToken
/// The hash of the master key to authenticate the request.
let masterKeyHash: Data
}
extension DeviceDecision: Codable {
}