removed extra string keychain samples locations
Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>
This commit is contained in:
parent
5be1080e08
commit
f136869171
@ -7,7 +7,7 @@ extension StorageKey where Value == String {
|
|||||||
/// Stores API token in keychain.
|
/// Stores API token in keychain.
|
||||||
nonisolated static let apiToken = StorageKey(
|
nonisolated static let apiToken = StorageKey(
|
||||||
name: "api_token",
|
name: "api_token",
|
||||||
domain: .keychain(service: StorageServiceIdentifiers.keychainAPIToken),
|
domain: .keychain(service: nil),
|
||||||
security: .keychain(
|
security: .keychain(
|
||||||
accessibility: .whenUnlockedThisDeviceOnly,
|
accessibility: .whenUnlockedThisDeviceOnly,
|
||||||
accessControl: nil
|
accessControl: nil
|
||||||
|
|||||||
@ -8,7 +8,7 @@ extension StorageKey where Value == Credential {
|
|||||||
/// Configurable accessibility and access control.
|
/// Configurable accessibility and access control.
|
||||||
nonisolated static let credentials = StorageKey(
|
nonisolated static let credentials = StorageKey(
|
||||||
name: "user_credentials",
|
name: "user_credentials",
|
||||||
domain: .keychain(service: StorageServiceIdentifiers.keychainCredentials),
|
domain: .keychain(service: nil),
|
||||||
security: .keychain(accessibility: .afterFirstUnlock, accessControl: nil),
|
security: .keychain(accessibility: .afterFirstUnlock, accessControl: nil),
|
||||||
serializer: .json,
|
serializer: .json,
|
||||||
owner: "SampleApp",
|
owner: "SampleApp",
|
||||||
@ -26,7 +26,7 @@ extension StorageKey where Value == Credential {
|
|||||||
) -> StorageKey {
|
) -> StorageKey {
|
||||||
StorageKey(
|
StorageKey(
|
||||||
name: "user_credentials",
|
name: "user_credentials",
|
||||||
domain: .keychain(service: StorageServiceIdentifiers.keychainCredentials),
|
domain: .keychain(service: nil),
|
||||||
security: .keychain(accessibility: accessibility, accessControl: accessControl),
|
security: .keychain(accessibility: accessibility, accessControl: accessControl),
|
||||||
serializer: .json,
|
serializer: .json,
|
||||||
owner: "SampleApp",
|
owner: "SampleApp",
|
||||||
|
|||||||
@ -7,7 +7,7 @@ extension StorageKey where Value == Data {
|
|||||||
/// Stores external key material used for encryption policies.
|
/// Stores external key material used for encryption policies.
|
||||||
nonisolated static let externalKeyMaterial = StorageKey(
|
nonisolated static let externalKeyMaterial = StorageKey(
|
||||||
name: "external_key_material",
|
name: "external_key_material",
|
||||||
domain: .keychain(service: StorageServiceIdentifiers.keychainExternalKeyMaterial),
|
domain: .keychain(service: nil),
|
||||||
security: .keychain(
|
security: .keychain(
|
||||||
accessibility: .afterFirstUnlock,
|
accessibility: .afterFirstUnlock,
|
||||||
accessControl: nil
|
accessControl: nil
|
||||||
|
|||||||
@ -7,7 +7,7 @@ extension StorageKey where Value == SampleLocationData {
|
|||||||
/// Stores sensitive location data in keychain with biometric protection.
|
/// Stores sensitive location data in keychain with biometric protection.
|
||||||
nonisolated static let lastLocation = StorageKey(
|
nonisolated static let lastLocation = StorageKey(
|
||||||
name: "last_known_location",
|
name: "last_known_location",
|
||||||
domain: .keychain(service: StorageServiceIdentifiers.keychainLocation),
|
domain: .keychain(service: nil),
|
||||||
security: .keychain(
|
security: .keychain(
|
||||||
accessibility: .afterFirstUnlock,
|
accessibility: .afterFirstUnlock,
|
||||||
accessControl: .userPresence
|
accessControl: .userPresence
|
||||||
|
|||||||
@ -17,7 +17,7 @@ extension StorageKey where Value == String {
|
|||||||
|
|
||||||
nonisolated static let modernAppMode = StorageKey(
|
nonisolated static let modernAppMode = StorageKey(
|
||||||
name: "modern_app_mode",
|
name: "modern_app_mode",
|
||||||
domain: .keychain(service: StorageServiceIdentifiers.keychainLocation),
|
domain: .keychain(service: nil),
|
||||||
security: .keychain(
|
security: .keychain(
|
||||||
accessibility: .afterFirstUnlock,
|
accessibility: .afterFirstUnlock,
|
||||||
accessControl: .userPresence
|
accessControl: .userPresence
|
||||||
|
|||||||
@ -19,7 +19,7 @@ extension StorageKey where Value == String {
|
|||||||
/// The modern key where data should end up (in Keychain).
|
/// The modern key where data should end up (in Keychain).
|
||||||
nonisolated static let modernMigrationDestination = StorageKey(
|
nonisolated static let modernMigrationDestination = StorageKey(
|
||||||
name: "secure_user_id",
|
name: "secure_user_id",
|
||||||
domain: .keychain(service: StorageServiceIdentifiers.keychainLocation),
|
domain: .keychain(service: nil),
|
||||||
security: .keychain(
|
security: .keychain(
|
||||||
accessibility: .afterFirstUnlock,
|
accessibility: .afterFirstUnlock,
|
||||||
accessControl: .userPresence
|
accessControl: .userPresence
|
||||||
|
|||||||
@ -20,7 +20,7 @@ extension StorageKey where Value == String {
|
|||||||
extension StorageKey where Value == ProfileName {
|
extension StorageKey where Value == ProfileName {
|
||||||
nonisolated static let modernProfileName = StorageKey(
|
nonisolated static let modernProfileName = StorageKey(
|
||||||
name: "modern_profile_name",
|
name: "modern_profile_name",
|
||||||
domain: .keychain(service: StorageServiceIdentifiers.keychainLocation),
|
domain: .keychain(service: nil),
|
||||||
security: .keychain(
|
security: .keychain(
|
||||||
accessibility: .afterFirstUnlock,
|
accessibility: .afterFirstUnlock,
|
||||||
accessControl: .userPresence
|
accessControl: .userPresence
|
||||||
|
|||||||
@ -28,20 +28,4 @@ public enum StorageServiceIdentifiers {
|
|||||||
Logger.debug("App Group ID: \(appGroupIdentifier)")
|
Logger.debug("App Group ID: \(appGroupIdentifier)")
|
||||||
Logger.debug("---------------------------")
|
Logger.debug("---------------------------")
|
||||||
}
|
}
|
||||||
|
|
||||||
public static var keychainCredentials: String {
|
|
||||||
"\(teamIDPrefix)\(bundleIdentifier)"
|
|
||||||
}
|
|
||||||
|
|
||||||
public static var keychainAPIToken: String {
|
|
||||||
"\(teamIDPrefix)\(bundleIdentifier).api"
|
|
||||||
}
|
|
||||||
|
|
||||||
public static var keychainExternalKeyMaterial: String {
|
|
||||||
"\(teamIDPrefix)\(bundleIdentifier).externalkey"
|
|
||||||
}
|
|
||||||
|
|
||||||
public static var keychainLocation: String {
|
|
||||||
"\(teamIDPrefix)\(bundleIdentifier).security"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user