From e36bb0cf33de239a00ec31dd40fb931c35ac4ab3 Mon Sep 17 00:00:00 2001 From: dankito Date: Thu, 8 Oct 2020 17:06:55 +0200 Subject: [PATCH] Renamed loginWithPassword() to authenticateUserWithPassword() and loginWithBiometricAuthentication() to authenticateUserWithBiometric() --- .../BankingiOSApp/Security/AuthenticationService.swift | 4 ++-- ui/BankingiOSApp/BankingiOSApp/ui/dialogs/LoginDialog.swift | 4 ++-- .../BankingiOSApp/ui/dialogs/ProtectAppSettingsDialog.swift | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/BankingiOSApp/BankingiOSApp/Security/AuthenticationService.swift b/ui/BankingiOSApp/BankingiOSApp/Security/AuthenticationService.swift index 916feef7..b9738a4d 100644 --- a/ui/BankingiOSApp/BankingiOSApp/Security/AuthenticationService.swift +++ b/ui/BankingiOSApp/BankingiOSApp/Security/AuthenticationService.swift @@ -215,11 +215,11 @@ class AuthenticationService { } - func loginWithBiometricAuthentication(_ authenticationResult: @escaping (Bool, String?) -> Void) { + func authenticateUserWithBiometric(_ authenticationResult: @escaping (Bool, String?) -> Void) { biometricAuthenticationService.authenticate("Authenticate with biometrics to unlock app reason", authenticationResult) } - func loginWithPassword(_ enteredPassword: String, _ authenticationResult: @escaping (Bool, String?) -> Void) { + func authenticateUserWithPassword(_ enteredPassword: String, _ authenticationResult: @escaping (Bool, String?) -> Void) { if retrieveLoginPassword() == enteredPassword { authenticationResult(true, nil) } diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/dialogs/LoginDialog.swift b/ui/BankingiOSApp/BankingiOSApp/ui/dialogs/LoginDialog.swift index f27a29ce..e17bc2db 100644 --- a/ui/BankingiOSApp/BankingiOSApp/ui/dialogs/LoginDialog.swift +++ b/ui/BankingiOSApp/BankingiOSApp/ui/dialogs/LoginDialog.swift @@ -94,7 +94,7 @@ struct LoginDialog: View { private func loginWithBiometricAuthentication() { - authenticationService.loginWithBiometricAuthentication(self.handleAuthenticationResult) + authenticationService.authenticateUserWithBiometric(self.handleAuthenticationResult) } private func loginWithPasswordOnReturnKeyPress() -> Bool { @@ -104,7 +104,7 @@ struct LoginDialog: View { } private func loginWithPassword() { - authenticationService.loginWithPassword(enteredPassword, self.handleAuthenticationResult) + authenticationService.authenticateUserWithPassword(enteredPassword, self.handleAuthenticationResult) } private func handleAuthenticationResult(success: Bool, errorMessage: String?) { diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/dialogs/ProtectAppSettingsDialog.swift b/ui/BankingiOSApp/BankingiOSApp/ui/dialogs/ProtectAppSettingsDialog.swift index bef446e3..0c5825e8 100644 --- a/ui/BankingiOSApp/BankingiOSApp/ui/dialogs/ProtectAppSettingsDialog.swift +++ b/ui/BankingiOSApp/BankingiOSApp/ui/dialogs/ProtectAppSettingsDialog.swift @@ -184,7 +184,7 @@ struct ProtectAppSettingsDialog: View { } private func doBiometricAuthentication() { - authenticationService.loginWithBiometricAuthentication { success, errorMessage in + authenticationService.authenticateUserWithBiometric { success, errorMessage in self.successfullyAuthenticatedWithBiometricAuthentication = success } }