Skip to content

Commit

Permalink
Rename token to accessToken.
Browse files Browse the repository at this point in the history
  • Loading branch information
samsymons committed Dec 25, 2023
1 parent 66c11b9 commit a4a6d0e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ final class NavigationBarViewController: NSViewController {
let accountManager = AccountManager()
let networkProtectionTokenStorage = NetworkProtectionKeychainTokenStore()

if accountManager.authToken != nil && (try? networkProtectionTokenStorage.fetchToken()) == nil {
if accountManager.accessToken != nil && (try? networkProtectionTokenStorage.fetchToken()) == nil {
print("[NetP Subscription] Got access token but not auth token, meaning token exchange failed")
return
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@
#if NETWORK_PROTECTION && SUBSCRIPTION

import Foundation
import Account
import Subscription
import NetworkProtection

final class NetworkProtectionSubscriptionEventHandler {

private let accountManager: Account.AccountManaging
private let accountManager: AccountManaging
private let networkProtectionRedemptionCoordinator: NetworkProtectionCodeRedeeming
private let networkProtectionTokenStorage: NetworkProtectionTokenStore
private let networkProtectionFeatureDisabler: NetworkProtectionFeatureDisabling

init(accountManager: Account.AccountManaging = Account.AccountManager(),
init(accountManager: AccountManaging = AccountManager(),
networkProtectionRedemptionCoordinator: NetworkProtectionCodeRedeeming = NetworkProtectionCodeRedemptionCoordinator(),
networkProtectionTokenStorage: NetworkProtectionTokenStore = NetworkProtectionKeychainTokenStore(),
networkProtectionFeatureDisabler: NetworkProtectionFeatureDisabling = NetworkProtectionFeatureDisabler()) {
Expand All @@ -45,7 +45,7 @@ final class NetworkProtectionSubscriptionEventHandler {
}

@objc private func handleAccountDidSignIn() {
guard let token = accountManager.token else {
guard let token = accountManager.accessToken else {
assertionFailure("[NetP Subscription] AccountManager signed in but token could not be retrieved")
return
}
Expand Down

0 comments on commit a4a6d0e

Please sign in to comment.