-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed unauthorized error handling, fixed Box integration tests
- Loading branch information
1 parent
423e085
commit b0b45c1
Showing
6 changed files
with
73 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
Tests/CryptomatorCloudAccessIntegrationTests/Box/BoxAuthenticationMock.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// BoxAuthenticationMock.swift | ||
// CryptomatorCloudAccessIntegrationTests | ||
// | ||
// Created by Tobias Hagemann on 21.08.24. | ||
// Copyright © 2024 Skymatic GmbH. All rights reserved. | ||
// | ||
|
||
import BoxSdkGen | ||
import Foundation | ||
|
||
class BoxAuthenticationMock: Authentication { | ||
func retrieveToken(networkSession: NetworkSession?) async throws -> AccessToken { | ||
return AccessToken() | ||
} | ||
|
||
func refreshToken(networkSession: NetworkSession?) async throws -> AccessToken { | ||
return AccessToken() | ||
} | ||
|
||
func retrieveAuthorizationHeader(networkSession: NetworkSession?) async throws -> String { | ||
return "" | ||
} | ||
|
||
func revokeToken(networkSession: NetworkSession?) async throws { | ||
// do nothing | ||
} | ||
|
||
func downscopeToken(scopes: [String], resource: String?, sharedLink: String?, networkSession: BoxSdkGen.NetworkSession?) async throws -> AccessToken { | ||
return AccessToken() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters