Skip to content
This repository was archived by the owner on Feb 24, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ final class NetworkProtectionKeychainStore {
private let keychainType: KeychainType

init(label: String,
serviceName: String,
keychainType: KeychainType) {
serviceName: String,
keychainType: KeychainType) {

self.label = label
self.serviceName = serviceName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,17 @@ public final class NetworkProtectionKeychainTokenStore: NetworkProtectionTokenSt
private let keychainStore: NetworkProtectionKeychainStore
private let errorEvents: EventMapping<NetworkProtectionError>?

private struct Defaults {
public struct Defaults {
static let tokenStoreEntryLabel = "DuckDuckGo Network Protection Auth Token"
static let tokenStoreService = "\(Bundle.main.bundleIdentifier!).authToken"
public static let tokenStoreService = "com.duckduckgo.networkprotection.authToken"
static let tokenStoreName = "com.duckduckgo.networkprotection.token"
}

public init(keychainType: KeychainType,
serviceName: String = Defaults.tokenStoreService,
errorEvents: EventMapping<NetworkProtectionError>?) {
keychainStore = NetworkProtectionKeychainStore(label: Defaults.tokenStoreEntryLabel,
serviceName: Defaults.tokenStoreService,
serviceName: serviceName,
keychainType: keychainType)
self.errorEvents = errorEvents
}
Expand Down