Introduce constants for Git password identifiers
This commit is contained in:
parent
730542d5bb
commit
c824bb10e7
2 changed files with 6 additions and 4 deletions
|
|
@ -29,6 +29,8 @@ public class Globals {
|
|||
public static let iTunesFileSharingPGPPrivate = iTunesFileSharingPath + "/gpg_key"
|
||||
public static let iTunesFileSharingSSHPrivate = iTunesFileSharingPath + "/ssh_key"
|
||||
|
||||
public static let gitPassword = "gitPassword"
|
||||
public static let gitSSHPrivateKeyPassphrase = "gitSSHPrivateKeyPassphrase"
|
||||
public static let pgpKeyPassphrase = "pgpKeyPassphrase"
|
||||
|
||||
public static let gitSignatureDefaultName = "Pass for iOS"
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue