Renamed createKeychainPasswordItem() to createUserLoginPasswordKeychainItem()

This commit is contained in:
dankito 2020-10-02 03:48:44 +02:00
parent 96c842cc89
commit 2ca698f9e2
1 changed files with 6 additions and 6 deletions

View File

@ -5,7 +5,7 @@ class AuthenticationService {
static private let AuthenticationTypeUserDefaultsKey = "AuthenticationType"
static private let KeychainAccountName = "LoginPassword"
static private let UserLoginPasswordKeychainAccountName = "UserLoginPassword"
private let biometricAuthenticationService = BiometricAuthenticationService()
@ -68,7 +68,7 @@ class AuthenticationService {
@discardableResult
private func setLoginPassword(_ newPassword: String) -> Bool {
do {
let passwordItem = createKeychainPasswordItem()
let passwordItem = createUserLoginPasswordKeychainItem()
try passwordItem.savePassword(newPassword)
@ -83,7 +83,7 @@ class AuthenticationService {
@discardableResult
private func deleteLoginPassword() -> Bool {
do {
let passwordItem = createKeychainPasswordItem()
let passwordItem = createUserLoginPasswordKeychainItem()
try passwordItem.deleteItem()
@ -97,7 +97,7 @@ class AuthenticationService {
private func retrieveLoginPassword() -> String? {
do {
let passwordItem = createKeychainPasswordItem()
let passwordItem = createUserLoginPasswordKeychainItem()
return try passwordItem.readPassword()
} catch {
@ -107,8 +107,8 @@ class AuthenticationService {
return nil
}
private func createKeychainPasswordItem() -> KeychainPasswordItem {
return KeychainPasswordItem(Self.KeychainAccountName)
private func createUserLoginPasswordKeychainItem() -> KeychainPasswordItem {
return KeychainPasswordItem(Self.UserLoginPasswordKeychainAccountName)
}