Skip to content

Commit

Permalink
Ported set/change/remove OATH password to SwiftUI.
Browse files Browse the repository at this point in the history
  • Loading branch information
jensutbult committed Aug 29, 2024
1 parent b461437 commit c6dda52
Show file tree
Hide file tree
Showing 11 changed files with 479 additions and 22 deletions.
14 changes: 14 additions & 0 deletions Authenticator.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@
B42A39332B2A03D20039DB26 /* YubiKit in Frameworks */ = {isa = PBXBuildFile; productRef = B42A39322B2A03D20039DB26 /* YubiKit */; };
B44E5E812C74BE67007ABB79 /* OATHResetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B44E5E802C74BE67007ABB79 /* OATHResetView.swift */; };
B44E5E842C74C8CC007ABB79 /* YubiKit in Frameworks */ = {isa = PBXBuildFile; productRef = B44E5E832C74C8CC007ABB79 /* YubiKit */; };
B44E5EB32C777F22007ABB79 /* OATHPasswordViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B44E5EB22C777F22007ABB79 /* OATHPasswordViewModel.swift */; };
B44E5EBB2C778802007ABB79 /* OATHPasswordView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B44E5EBA2C778802007ABB79 /* OATHPasswordView.swift */; };
B452EC1F2A1E4F460045E5D9 /* YubiOtpRowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B452EC1E2A1E4F460045E5D9 /* YubiOtpRowView.swift */; };
B452EC3D2A264A620045E5D9 /* ToastView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B452EC3C2A264A620045E5D9 /* ToastView.swift */; };
B452EC442A2A06940045E5D9 /* ToastPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = B452EC432A2A06940045E5D9 /* ToastPresenter.swift */; };
Expand All @@ -100,6 +102,8 @@
B4901AF42BD7DF960092E7A2 /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = B4901AF32BD7DF960092E7A2 /* Localizable.xcstrings */; };
B4901B082BD91DA60092E7A2 /* InfoPlist.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = B4901B072BD91DA60092E7A2 /* InfoPlist.xcstrings */; };
B4B1711827DF8C48002A62DE /* ScanAccountView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4B1711727DF8C48002A62DE /* ScanAccountView.swift */; };
B4BB02D92C80987B00B72904 /* SettingsButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4BB02D82C80987B00B72904 /* SettingsButton.swift */; };
B4BB02DA2C809BE800B72904 /* NFCSettingsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51AFD4D32716FC78008F2630 /* NFCSettingsController.swift */; };
B4C93E60299D156C00C2A8B8 /* ErrorAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4C93E5F299D156C00C2A8B8 /* ErrorAlertView.swift */; };
B4C93E63299FB51A00C2A8B8 /* Account.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4C93E62299FB51A00C2A8B8 /* Account.swift */; };
B4C93E65299FC67800C2A8B8 /* View+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4C93E64299FC67800C2A8B8 /* View+Extensions.swift */; };
Expand Down Expand Up @@ -230,6 +234,8 @@
B40F44442B27033A000D5E02 /* TokenRequestYubiOTPViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TokenRequestYubiOTPViewController.swift; sourceTree = "<group>"; };
B411242E29D423A300D58001 /* ListStatusView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListStatusView.swift; sourceTree = "<group>"; };
B44E5E802C74BE67007ABB79 /* OATHResetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OATHResetView.swift; sourceTree = "<group>"; };
B44E5EB22C777F22007ABB79 /* OATHPasswordViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OATHPasswordViewModel.swift; sourceTree = "<group>"; };
B44E5EBA2C778802007ABB79 /* OATHPasswordView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OATHPasswordView.swift; sourceTree = "<group>"; };
B452EC1E2A1E4F460045E5D9 /* YubiOtpRowView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YubiOtpRowView.swift; sourceTree = "<group>"; };
B452EC3C2A264A620045E5D9 /* ToastView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToastView.swift; sourceTree = "<group>"; };
B452EC432A2A06940045E5D9 /* ToastPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToastPresenter.swift; sourceTree = "<group>"; };
Expand All @@ -256,6 +262,7 @@
B4901AF32BD7DF960092E7A2 /* Localizable.xcstrings */ = {isa = PBXFileReference; lastKnownFileType = text.json.xcstrings; path = Localizable.xcstrings; sourceTree = "<group>"; };
B4901B072BD91DA60092E7A2 /* InfoPlist.xcstrings */ = {isa = PBXFileReference; lastKnownFileType = text.json.xcstrings; path = InfoPlist.xcstrings; sourceTree = "<group>"; };
B4B1711727DF8C48002A62DE /* ScanAccountView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScanAccountView.swift; sourceTree = "<group>"; };
B4BB02D82C80987B00B72904 /* SettingsButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsButton.swift; sourceTree = "<group>"; };
B4C93E5F299D156C00C2A8B8 /* ErrorAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ErrorAlertView.swift; sourceTree = "<group>"; };
B4C93E62299FB51A00C2A8B8 /* Account.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Account.swift; sourceTree = "<group>"; };
B4C93E64299FC67800C2A8B8 /* View+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "View+Extensions.swift"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -312,6 +319,7 @@
513D4DF02660D5AB0022C53D /* YubiKeyConfiguration */ = {
isa = PBXGroup;
children = (
B44E5EBA2C778802007ABB79 /* OATHPasswordView.swift */,
B4C93E9029C0B70B00C2A8B8 /* ConfigurationWrapper.swift */,
513D4DF42660EBA40022C53D /* ConfigurationController.swift */,
51A162852678A1F100C3FA1E /* OATHConfigurationController.swift */,
Expand Down Expand Up @@ -421,6 +429,7 @@
B4C93E8829B89DE300C2A8B8 /* DetachedMenu.swift */,
B452EC3C2A264A620045E5D9 /* ToastView.swift */,
B452EC432A2A06940045E5D9 /* ToastPresenter.swift */,
B4BB02D82C80987B00B72904 /* SettingsButton.swift */,
);
path = Helpers;
sourceTree = "<group>";
Expand Down Expand Up @@ -519,6 +528,7 @@
513D4DF8266A21250022C53D /* DelegateStack.swift */,
51002C2D267C95D9005D5A7C /* YubiKeyInformationViewModel.swift */,
5180974226DE185100A122C1 /* ResetOATHViewModel.swift */,
B44E5EB22C777F22007ABB79 /* OATHPasswordViewModel.swift */,
51AFD4D52716FCDB008F2630 /* ApplicationSettingsViewModel.swift */,
A5E9DEAF237DE1660011FBF4 /* SettingsConfig.swift */,
B4DB2289299BC373003110ED /* OATHSession.swift */,
Expand Down Expand Up @@ -741,6 +751,7 @@
A591412123835F4600CCCF67 /* Constants.swift in Sources */,
515542852656A30B00B19C59 /* UIButton+Extensions.swift in Sources */,
51BBE37F273982D700DA47CC /* YKFOATHSession+Extensions.swift in Sources */,
B44E5EB32C777F22007ABB79 /* OATHPasswordViewModel.swift in Sources */,
B44E5E812C74BE67007ABB79 /* OATHResetView.swift in Sources */,
B411242F29D423A300D58001 /* ListStatusView.swift in Sources */,
816C684823430F8E00209342 /* SecureStoreQueryable.swift in Sources */,
Expand Down Expand Up @@ -783,6 +794,7 @@
51D1E84E26427F7600BDA3FF /* PasswordCache.swift in Sources */,
A5D4E86D24083CF300FD63A0 /* OTPConfigurationController.swift in Sources */,
5156D05F265D3CEF007A94F8 /* TokenRequestViewModel.swift in Sources */,
B4BB02D92C80987B00B72904 /* SettingsButton.swift in Sources */,
5155426A26554CAB00B19C59 /* SmartCardViewModel.swift in Sources */,
B4C93E9329C1B2BC00C2A8B8 /* AboutWrapper.swift in Sources */,
515542682654413600B19C59 /* SmartCardConfigurationController.swift in Sources */,
Expand All @@ -798,6 +810,7 @@
5155428A2656F79500B19C59 /* SecCertificate+Extensions.swift in Sources */,
816C685E234697BF00209342 /* PasswordPreferences.swift in Sources */,
B4C93E9529C1B90900C2A8B8 /* AddAccountWrapper.swift in Sources */,
B44E5EBB2C778802007ABB79 /* OATHPasswordView.swift in Sources */,
B452EC3D2A264A620045E5D9 /* ToastView.swift in Sources */,
513D4DF7266634280022C53D /* ShowTime.swift in Sources */,
513D4DF52660EBA40022C53D /* ConfigurationController.swift in Sources */,
Expand All @@ -808,6 +821,7 @@
51EEC532246D34ED00061A8F /* YKFKeyVersion+Extensions.swift in Sources */,
B4719B1B298AB641006CDAEA /* MainViewModel.swift in Sources */,
51394C5826CFE15F009F366D /* YubiMenu.swift in Sources */,
B4BB02DA2C809BE800B72904 /* NFCSettingsController.swift in Sources */,
A5B531F22437CD16008C501C /* VersionHistoryViewController.swift in Sources */,
B4C93E65299FC67800C2A8B8 /* View+Extensions.swift in Sources */,
816C685023440D2200209342 /* SecureStoreError.swift in Sources */,
Expand Down
49 changes: 49 additions & 0 deletions Authenticator/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,12 @@
}
}
}
},
"Change password" : {

},
"Change the password for this YubiKey. %@" : {

},
"Clear" : {
"comment" : "Clear password alert button",
Expand Down Expand Up @@ -474,6 +480,9 @@
}
}
}
},
"Confirm OATH reset" : {

},
"Continue with limited usability" : {
"localizations" : {
Expand Down Expand Up @@ -524,6 +533,9 @@
}
}
}
},
"Current password" : {

},
"Data to String conversion error" : {
"localizations" : {
Expand Down Expand Up @@ -827,6 +839,7 @@
},
"Failed to reset YubiKey" : {
"comment" : "Reset YubiKey failure alert title",
"extractionState" : "stale",
"localizations" : {
"fr" : {
"stringUnit" : {
Expand Down Expand Up @@ -991,6 +1004,9 @@
}
}
}
},
"Manage OATH passwords" : {

},
"Menu" : {
"localizations" : {
Expand Down Expand Up @@ -1041,6 +1057,9 @@
}
}
}
},
"New Password" : {

},
"No account information found!" : {
"comment" : "Scan QR code no account error message",
Expand Down Expand Up @@ -1260,6 +1279,9 @@
}
}
}
},
"OATH passwords" : {

},
"Ok" : {
"comment" : "Password alert",
Expand Down Expand Up @@ -1562,6 +1584,9 @@
}
}
}
},
"Protect this YubiKey with a password." : {

},
"Public key certificates on" : {
"comment" : "PIV extension no certs on device message",
Expand Down Expand Up @@ -1680,6 +1705,9 @@
}
}
}
},
"Remove the password for this YubiKey." : {

},
"Rename" : {
"comment" : "Menu",
Expand All @@ -1697,6 +1725,9 @@
}
}
}
},
"Repeat new password" : {

},
"Reset" : {
"comment" : "Reset YubiKey alert button",
Expand All @@ -1714,9 +1745,13 @@
}
}
}
},
"Reset all accounts stored on YubiKey, make sure they are not in use anywhere before doing this." : {

},
"Reset complete" : {
"comment" : "Reset YubiKey complete alert title",
"extractionState" : "stale",
"localizations" : {
"fr" : {
"stringUnit" : {
Expand All @@ -1731,9 +1766,16 @@
}
}
}
},
"Reset OATH" : {

},
"Reset OATH application" : {

},
"Reset YubiKey?" : {
"comment" : "Reset YubiKey alert title",
"extractionState" : "stale",
"localizations" : {
"fr" : {
"stringUnit" : {
Expand Down Expand Up @@ -1898,6 +1940,9 @@
}
}
}
},
"Set password" : {

},
"Settings" : {
"comment" : "PIV extension settings alert title",
Expand Down Expand Up @@ -2256,6 +2301,7 @@
},
"This will delete all accounts and restore factory defaults of your YubiKey." : {
"comment" : "Reset YubiKey alert message",
"extractionState" : "stale",
"localizations" : {
"fr" : {
"stringUnit" : {
Expand Down Expand Up @@ -2638,6 +2684,9 @@
}
}
}
},
"YubiKey has been reset" : {

},
"YubiKey information read" : {
"comment" : "YubiKey info NFC read",
Expand Down
Loading

0 comments on commit c6dda52

Please sign in to comment.