Renamed loginWithPassword() to authenticateUserWithPassword() and loginWithBiometricAuthentication() to authenticateUserWithBiometric()

This commit is contained in:
dankito 2020-10-08 17:06:55 +02:00
parent 7047773e7b
commit e36bb0cf33
3 changed files with 5 additions and 5 deletions

View File

@ -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)
}

View File

@ -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?) {

View File

@ -184,7 +184,7 @@ struct ProtectAppSettingsDialog: View {
}
private func doBiometricAuthentication() {
authenticationService.loginWithBiometricAuthentication { success, errorMessage in
authenticationService.authenticateUserWithBiometric { success, errorMessage in
self.successfullyAuthenticatedWithBiometricAuthentication = success
}
}