mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Initial service implementation for using a PIN code. (#1912)
* Initial service implementation for using a PIN code. * Tweak Danger for commit size 600-800 lines is perfectly normal for our PRs, up it to 1000.
This commit is contained in:
@@ -24,9 +24,24 @@ struct KeychainCredentials {
|
||||
|
||||
// sourcery: AutoMockable
|
||||
protocol KeychainControllerProtocol: ClientSessionDelegate {
|
||||
// MARK: Restoration Tokens
|
||||
|
||||
func setRestorationToken(_ restorationToken: RestorationToken, forUsername: String)
|
||||
func restorationTokenForUsername(_ username: String) -> RestorationToken?
|
||||
func restorationTokens() -> [KeychainCredentials]
|
||||
func removeRestorationTokenForUsername(_ username: String)
|
||||
func removeAllRestorationTokens()
|
||||
|
||||
// MARK: App Secrets
|
||||
|
||||
/// Removes everything from the keychain excluding any restoration tokens.
|
||||
func resetSecrets()
|
||||
/// Whether or not an App Lock PIN code has been set.
|
||||
func containsPINCode() throws -> Bool
|
||||
/// Sets a new PIN code for App Lock.
|
||||
func setPINCode(_ pinCode: String) throws
|
||||
/// The PIN code required to unlock the app.
|
||||
func pinCode() -> String?
|
||||
/// Removes the App Lock PIN code.
|
||||
func removePINCode()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user