20 lines
618 B
Swift
20 lines
618 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.
|
|
*/
|
|
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 {
|
|
|
|
}
|