Renamed loginWithPassword() to authenticateUserWithPassword() and loginWithBiometricAuthentication() to authenticateUserWithBiometric()
This commit is contained in:
parent
7047773e7b
commit
e36bb0cf33
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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?) {
|
||||
|
|
|
@ -184,7 +184,7 @@ struct ProtectAppSettingsDialog: View {
|
|||
}
|
||||
|
||||
private func doBiometricAuthentication() {
|
||||
authenticationService.loginWithBiometricAuthentication { success, errorMessage in
|
||||
authenticationService.authenticateUserWithBiometric { success, errorMessage in
|
||||
self.successfullyAuthenticatedWithBiometricAuthentication = success
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue