Renamed createKeychainPasswordItem() to createUserLoginPasswordKeychainItem()
This commit is contained in:
parent
96c842cc89
commit
2ca698f9e2
|
@ -5,7 +5,7 @@ class AuthenticationService {
|
||||||
|
|
||||||
static private let AuthenticationTypeUserDefaultsKey = "AuthenticationType"
|
static private let AuthenticationTypeUserDefaultsKey = "AuthenticationType"
|
||||||
|
|
||||||
static private let KeychainAccountName = "LoginPassword"
|
static private let UserLoginPasswordKeychainAccountName = "UserLoginPassword"
|
||||||
|
|
||||||
private let biometricAuthenticationService = BiometricAuthenticationService()
|
private let biometricAuthenticationService = BiometricAuthenticationService()
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ class AuthenticationService {
|
||||||
@discardableResult
|
@discardableResult
|
||||||
private func setLoginPassword(_ newPassword: String) -> Bool {
|
private func setLoginPassword(_ newPassword: String) -> Bool {
|
||||||
do {
|
do {
|
||||||
let passwordItem = createKeychainPasswordItem()
|
let passwordItem = createUserLoginPasswordKeychainItem()
|
||||||
|
|
||||||
try passwordItem.savePassword(newPassword)
|
try passwordItem.savePassword(newPassword)
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ class AuthenticationService {
|
||||||
@discardableResult
|
@discardableResult
|
||||||
private func deleteLoginPassword() -> Bool {
|
private func deleteLoginPassword() -> Bool {
|
||||||
do {
|
do {
|
||||||
let passwordItem = createKeychainPasswordItem()
|
let passwordItem = createUserLoginPasswordKeychainItem()
|
||||||
|
|
||||||
try passwordItem.deleteItem()
|
try passwordItem.deleteItem()
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ class AuthenticationService {
|
||||||
|
|
||||||
private func retrieveLoginPassword() -> String? {
|
private func retrieveLoginPassword() -> String? {
|
||||||
do {
|
do {
|
||||||
let passwordItem = createKeychainPasswordItem()
|
let passwordItem = createUserLoginPasswordKeychainItem()
|
||||||
|
|
||||||
return try passwordItem.readPassword()
|
return try passwordItem.readPassword()
|
||||||
} catch {
|
} catch {
|
||||||
|
@ -107,8 +107,8 @@ class AuthenticationService {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
private func createKeychainPasswordItem() -> KeychainPasswordItem {
|
private func createUserLoginPasswordKeychainItem() -> KeychainPasswordItem {
|
||||||
return KeychainPasswordItem(Self.KeychainAccountName)
|
return KeychainPasswordItem(Self.UserLoginPasswordKeychainAccountName)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue