diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2023-06-08 14:02:34 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2023-06-08 14:02:34 +0200 |
| commit | ac8deecc4ebd4a71810006d221292c03e36ad120 (patch) | |
| tree | c76f15cc8d0819f3eef59e766235bfd7049a5503 /ios/PacketTunnel/DeviceCheck/DeviceCheckRemoteServiceProtocol.swift | |
| parent | 0ca8f82db446df494b400f0b467de1bef9e051e4 (diff) | |
| parent | dab9467547a35369aafdda7174287921dc7accc8 (diff) | |
| download | mullvadvpn-ac8deecc4ebd4a71810006d221292c03e36ad120.tar.xz mullvadvpn-ac8deecc4ebd4a71810006d221292c03e36ad120.zip | |
Merge remote-tracking branch 'origin/packet-tunnel-should-rotate-the-key-if-ios-109'
Diffstat (limited to 'ios/PacketTunnel/DeviceCheck/DeviceCheckRemoteServiceProtocol.swift')
| -rw-r--r-- | ios/PacketTunnel/DeviceCheck/DeviceCheckRemoteServiceProtocol.swift | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/ios/PacketTunnel/DeviceCheck/DeviceCheckRemoteServiceProtocol.swift b/ios/PacketTunnel/DeviceCheck/DeviceCheckRemoteServiceProtocol.swift new file mode 100644 index 0000000000..faf22e3680 --- /dev/null +++ b/ios/PacketTunnel/DeviceCheck/DeviceCheckRemoteServiceProtocol.swift @@ -0,0 +1,25 @@ +// +// DeviceCheckRemoteServiceProtocol.swift +// PacketTunnel +// +// Created by pronebird on 07/06/2023. +// Copyright © 2023 Mullvad VPN AB. All rights reserved. +// + +import Foundation +import MullvadTypes +import class WireGuardKitTypes.PublicKey + +/// A protocol that formalizes remote service dependency used by `DeviceCheckOperation`. +protocol DeviceCheckRemoteServiceProtocol { + func getAccountData(accountNumber: String, completion: @escaping (Result<Account, Error>) -> Void) + -> Cancellable + func getDevice(accountNumber: String, identifier: String, completion: @escaping (Result<Device, Error>) -> Void) + -> Cancellable + func rotateDeviceKey( + accountNumber: String, + identifier: String, + publicKey: PublicKey, + completion: @escaping (Result<Device, Error>) -> Void + ) -> Cancellable +} |
