summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJustin Anderson <jander@mit.edu>2008-10-29 21:14:39 +0000
committerJustin Anderson <jander@mit.edu>2008-10-29 21:14:39 +0000
commit1b8736d37a2672c83f02ce73916dc12da94013ac (patch)
treee49e852108aa88a06a029055b91442035792fb19 /src
parent32f33ef59775ac4510a3fdd6103c1381466a8080 (diff)
downloadkrb5-1b8736d37a2672c83f02ce73916dc12da94013ac.tar.gz
krb5-1b8736d37a2672c83f02ce73916dc12da94013ac.tar.xz
krb5-1b8736d37a2672c83f02ce73916dc12da94013ac.zip
Clear auth prompt on success or cancel. Leave change password fields filled in when password is incorrect, to save user from reentering new password
ticket: 6221 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20939 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/kim/agent/mac/AuthenticationController.h2
-rw-r--r--src/kim/agent/mac/AuthenticationController.m24
2 files changed, 26 insertions, 0 deletions
diff --git a/src/kim/agent/mac/AuthenticationController.h b/src/kim/agent/mac/AuthenticationController.h
index b443d8a73..ba0b21223 100644
--- a/src/kim/agent/mac/AuthenticationController.h
+++ b/src/kim/agent/mac/AuthenticationController.h
@@ -114,5 +114,7 @@
- (void) swapView: (NSView *) aView;
- (void) showSpinny;
- (void) hideSpinny;
+- (void) clearSensitiveInputs;
+- (void) clearAllInputs;
@end
diff --git a/src/kim/agent/mac/AuthenticationController.m b/src/kim/agent/mac/AuthenticationController.m
index 07449f876..8df6396fe 100644
--- a/src/kim/agent/mac/AuthenticationController.m
+++ b/src/kim/agent/mac/AuthenticationController.m
@@ -223,6 +223,23 @@
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;
@@ -288,6 +305,7 @@
forKeyPath:message_keypath];
[self hideSpinny];
+ [self clearAllInputs];
[self swapView:identityView];
@@ -302,6 +320,8 @@
[self hideSpinny];
+ [self clearSensitiveInputs];
+
switch (type) {
case kim_prompt_type_password :
[self showEnterPassword: parentWindow]; break;
@@ -407,6 +427,10 @@
[self hideSpinny];
+ if (![[self window] isVisible]) {
+ [self clearAllInputs];
+ }
+
[self swapView:changePasswordView];
[self showWithParent:parentWindow];