mirror of
https://github.com/maxgoedjen/secretive.git
synced 2026-03-06 01:37:22 +01:00
Allow limited key validity window for authenticated keys (#252)
This commit is contained in:
@@ -9,7 +9,9 @@ public protocol SecretStore: ObservableObject, Identifiable {
|
||||
var name: String { get }
|
||||
var secrets: [SecretType] { get }
|
||||
|
||||
func sign(data: Data, with secret: SecretType, for provenance: SigningRequestProvenance) throws -> Data
|
||||
func sign(data: Data, with secret: SecretType, for provenance: SigningRequestProvenance) throws -> SignedData
|
||||
|
||||
func persistAuthentication(secret: SecretType, forDuration duration: TimeInterval) throws
|
||||
|
||||
}
|
||||
|
||||
|
||||
13
SecretKit/Common/Types/SignedData.swift
Normal file
13
SecretKit/Common/Types/SignedData.swift
Normal file
@@ -0,0 +1,13 @@
|
||||
import Foundation
|
||||
|
||||
public struct SignedData {
|
||||
|
||||
public let data: Data
|
||||
public let requiredAuthentication: Bool
|
||||
|
||||
public init(data: Data, requiredAuthentication: Bool) {
|
||||
self.data = data
|
||||
self.requiredAuthentication = requiredAuthentication
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user