Skip to content

Commit

Permalink
update keychain entry for login password when password updated
Browse files Browse the repository at this point in the history
  • Loading branch information
twocanoes committed Jun 5, 2022
1 parent 65c9904 commit 749b879
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 21 deletions.
5 changes: 5 additions & 0 deletions XCreds/MainController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ class MainController: NSObject {

if verifyCloudPassword == cloudPassword {
try? PasswordUtils.changeLocalUserAndKeychainPassword(localPassword, newPassword1: cloudPassword, newPassword2: cloudPassword)
let err = keychainUtil.updatePassword("local password", pass: localPassword)
if err == false {
//TODO: Log Error
}

verifyOIDPassword.window?.close()
break;

Expand Down
4 changes: 1 addition & 3 deletions XCreds/ScheduleManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ class ScheduleManager {

}
else {
if let timer = self.timer {
timer.invalidate()
}
self.stopCredentialCheck()
NotifyManager.shared.sendMessage(message: "Azure password changed or not set")
DispatchQueue.main.async {
mainMenu.webView = WebViewController()
Expand Down
2 changes: 2 additions & 0 deletions XCreds/WebView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ extension WebViewController: OIDCLiteDelegate {

func authFailure(message: String) {
print("Auth failure :(")
NotificationCenter.default.post(name: Notification.Name("TCSTokensUpdated"), object: self, userInfo:[:])

}

func tokenResponse(tokens: OIDCLiteTokenResponse) {
Expand Down
4 changes: 2 additions & 2 deletions xCreds.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@
CODE_SIGN_ENTITLEMENTS = XCreds/xCreds.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1253;
CURRENT_PROJECT_VERSION = 1254;
DEVELOPMENT_TEAM = UXP6YEHSPW;
ENABLE_HARDENED_RUNTIME = YES;
GENERATE_INFOPLIST_FILE = YES;
Expand Down Expand Up @@ -398,7 +398,7 @@
CODE_SIGN_ENTITLEMENTS = XCreds/xCreds.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1253;
CURRENT_PROJECT_VERSION = 1254;
DEVELOPMENT_TEAM = UXP6YEHSPW;
ENABLE_HARDENED_RUNTIME = YES;
GENERATE_INFOPLIST_FILE = YES;
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,5 @@
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "A20FA142-934F-401A-91EF-5C93E8433521"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "XCreds/ScheduleManager.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "24"
endingLineNumber = "24"
landmarkName = "startCredentialCheck()"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>

0 comments on commit 749b879

Please sign in to comment.