Clear auth prompt on success or cancel. Leave change password fields filled in when...
authorJustin Anderson <jander@mit.edu>
Wed, 29 Oct 2008 21:14:39 +0000 (21:14 +0000)
committerJustin Anderson <jander@mit.edu>
Wed, 29 Oct 2008 21:14:39 +0000 (21:14 +0000)
ticket: 6221

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20939 dc483132-0cff-0310-8789-dd5450dbe970

src/kim/agent/mac/AuthenticationController.h
src/kim/agent/mac/AuthenticationController.m

index b443d8a7369be1273f773c00f49ee23e47d428ad..ba0b21223d749c2522f3d7741f06c87b8ae8fca0 100644 (file)
 - (void) swapView: (NSView *) aView;
 - (void) showSpinny;
 - (void) hideSpinny;
+- (void) clearSensitiveInputs;
+- (void) clearAllInputs;
 
 @end
index 07449f87633392722e2de796c4f6b70834e238b5..8df6396fef022cc1c1f977b64b59cf9de44ba362 100644 (file)
                   forKeyPath:accepting_input_keypath];
 }
 
+- (void) clearSensitiveInputs
+{
+    [glueController setValue:@"" 
+                  forKeyPath:prompt_response_keypath];
+}
+
+- (void) clearAllInputs
+{
+    [glueController setValue:@"" 
+                  forKeyPath:old_password_keypath];
+    [glueController setValue:@"" 
+                  forKeyPath:new_password_keypath];
+    [glueController setValue:@"" 
+                  forKeyPath:verify_password_keypath];
+    [self clearSensitiveInputs];
+}
+
 - (void) showEnterIdentity: (NSWindow *) parentWindow
 {
     kim_error err = KIM_NO_ERROR;
                   forKeyPath:message_keypath];
 
     [self hideSpinny];
+    [self clearAllInputs];
 
     [self swapView:identityView];
 
     
     [self hideSpinny];
 
+    [self clearSensitiveInputs];
+
     switch (type) {
         case kim_prompt_type_password :
             [self showEnterPassword: parentWindow]; break;
     
     [self hideSpinny];
     
+    if (![[self window] isVisible]) {
+        [self clearAllInputs];
+    }
+    
     [self swapView:changePasswordView];
 
     [self showWithParent:parentWindow];