Skip to content

Commit 1b59ae6

Browse files
committed
Send Device ID to Hub during vault key retrieval
1 parent ceb5eae commit 1b59ae6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

CryptomatorCommon/Sources/CryptomatorCommonCore/Hub/CryptomatorHubAuthenticator.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,8 @@ public class CryptomatorHubAuthenticator: HubDeviceRegistering, HubKeyReceiving
233233
throw CryptomatorHubAuthenticatorError.missingAccessToken
234234
}
235235
var urlRequest = URLRequest(url: url)
236-
urlRequest.allHTTPHeaderFields = ["Authorization": "Bearer \(accessToken)"]
236+
let deviceID = try getDeviceID()
237+
urlRequest.allHTTPHeaderFields = ["Authorization": "Bearer \(accessToken)", "Hub-Device-ID": deviceID]
237238
let (data, response) = try await URLSession.shared.data(with: urlRequest)
238239
let httpResponse = response as? HTTPURLResponse
239240
switch httpResponse?.statusCode {

0 commit comments

Comments
 (0)