Push-Definitions/Sources/PushAPI/DeviceDecision.swift
2022-06-05 12:10:38 +02:00

16 lines
594 B
Swift

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.
*/
public struct DeviceDecision: Codable {
/// 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
}