mirror of
https://github.com/maxgoedjen/secretive.git
synced 2026-03-05 09:24:49 +01:00
Remove changes
This commit is contained in:
@@ -4,19 +4,11 @@ import Combine
|
||||
extension SecureEnclave {
|
||||
|
||||
public struct Secret: SecretKit.Secret {
|
||||
public init(id: Data, name: String, publicKey: Data) {
|
||||
self.id = id
|
||||
self.name = name
|
||||
self.publicKey = publicKey
|
||||
}
|
||||
|
||||
|
||||
public let id: Data
|
||||
public let name: String
|
||||
public let publicKey: Data
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,17 +4,9 @@ import Combine
|
||||
extension SmartCard {
|
||||
|
||||
public struct Secret: SecretKit.Secret {
|
||||
public init(id: Data, name: String, publicKey: Data) {
|
||||
self.id = id
|
||||
// self.name = name
|
||||
self.publicKey = publicKey
|
||||
}
|
||||
|
||||
|
||||
|
||||
public let id: Data
|
||||
public var name: String {
|
||||
UUID().uuidString
|
||||
}
|
||||
public var name: String
|
||||
public let publicKey: Data
|
||||
|
||||
}
|
||||
|
||||
@@ -20,8 +20,11 @@ extension SmartCard {
|
||||
guard self.id == nil else { return }
|
||||
guard !string.contains("setoken") else { return }
|
||||
self.id = string
|
||||
self.secrets.removeAll()
|
||||
self.loadSecrets()
|
||||
self.reloadSecrets()
|
||||
self.watcher.addRemovalHandler(self.reloadSecrets, forTokenID: string)
|
||||
}
|
||||
if let id = id {
|
||||
self.watcher.addRemovalHandler(self.reloadSecrets, forTokenID: id)
|
||||
}
|
||||
loadSecrets()
|
||||
}
|
||||
@@ -67,6 +70,13 @@ extension SmartCard {
|
||||
|
||||
extension SmartCard.Store {
|
||||
|
||||
fileprivate func reloadSecrets(for tokenID: String? = nil) {
|
||||
DispatchQueue.main.async {
|
||||
self.secrets.removeAll()
|
||||
self.loadSecrets()
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate func loadSecrets() {
|
||||
guard let id = id else { return }
|
||||
let attributes = [
|
||||
|
||||
Reference in New Issue
Block a user