Introduce constants for Git password identifiers

This commit is contained in:
Danny Moesch 2019-09-11 22:02:48 +02:00 committed by Mingshen Sun
parent 730542d5bb
commit c824bb10e7
2 changed files with 6 additions and 4 deletions

View file

@ -37,19 +37,19 @@ public class PasswordStore {
public var gitPassword: String? {
set {
AppKeychain.shared.add(string: newValue, for: "gitPassword")
AppKeychain.shared.add(string: newValue, for: Globals.gitPassword)
}
get {
return AppKeychain.shared.get(for: "gitPassword")
return AppKeychain.shared.get(for: Globals.gitPassword)
}
}
public var gitSSHPrivateKeyPassphrase: String? {
set {
AppKeychain.shared.add(string: newValue, for: "gitSSHPrivateKeyPassphrase")
AppKeychain.shared.add(string: newValue, for: Globals.gitSSHPrivateKeyPassphrase)
}
get {
return AppKeychain.shared.get(for: "gitSSHPrivateKeyPassphrase")
return AppKeychain.shared.get(for: Globals.gitSSHPrivateKeyPassphrase)
}
}