From 63b0e281cfdfa1cb4f8487cc5f53cdf5c1860c06 Mon Sep 17 00:00:00 2001 From: Justin Anderson Date: Thu, 2 Oct 2008 03:48:48 +0000 Subject: [PATCH] Make Enter Identity dialog have one auto-completing, auto-validating text field for principals drawn from KIM's list of favorites. Changed options for a favorite identity get saved out to kim_preferences. Also, include copyright on more files. ticket:6055 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20807 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kim/agent/mac/AuthenticationController.h | 10 +- src/kim/agent/mac/AuthenticationController.m | 177 ++++--- src/kim/agent/mac/IPCClient.h | 33 +- src/kim/agent/mac/IPCClient.m | 34 +- src/kim/agent/mac/Identities.m | 4 +- src/kim/agent/mac/KIMUtilities.h | 75 ++- src/kim/agent/mac/KIMUtilities.m | 112 +++- src/kim/agent/mac/KerberosAgentController.m | 2 +- src/kim/agent/mac/KerberosAgentListener.h | 31 +- src/kim/agent/mac/KerberosAgentListener.m | 41 +- src/kim/agent/mac/KerberosFormatters.m | 12 +- src/kim/agent/mac/SelectIdentityController.h | 13 +- src/kim/agent/mac/SelectIdentityController.m | 60 ++- src/kim/agent/mac/ServerDemux.m | 2 +- .../English.lproj/Authentication.xib | 399 +++++++------- .../English.lproj/SelectIdentity.xib | 491 ++++++------------ 16 files changed, 797 insertions(+), 699 deletions(-) diff --git a/src/kim/agent/mac/AuthenticationController.h b/src/kim/agent/mac/AuthenticationController.h index ed5d9d79a..4035668e2 100644 --- a/src/kim/agent/mac/AuthenticationController.h +++ b/src/kim/agent/mac/AuthenticationController.h @@ -25,11 +25,14 @@ #import @class IPCClient; +@class KerberosTimeFormatter; @class BadgedImageView; @interface AuthenticationController : NSWindowController { IPCClient *associatedClient; + IBOutlet KerberosTimeFormatter *lifetimeFormatter; + IBOutlet NSView *containerView; IBOutlet NSView *identityView; IBOutlet NSView *passwordView; @@ -45,7 +48,7 @@ IBOutlet BadgedImageView *errorBadge; // Controls that need to be made key - IBOutlet NSTextField *usernameField; + IBOutlet NSTextField *identityField; IBOutlet NSTextField *passwordField; IBOutlet NSTextField *samPromptField; IBOutlet NSTextField *oldPasswordField; @@ -60,9 +63,14 @@ IBOutlet NSSlider *validLifetimeSlider; IBOutlet NSSlider *renewableLifetimeSlider; + + NSMutableArray *favoriteIdentities; + NSMutableDictionary *favoriteOptions; } @property (readwrite, retain) IPCClient *associatedClient; +@property (readwrite, retain) NSMutableArray *favoriteIdentities; +@property (readwrite, retain) NSMutableDictionary *favoriteOptions; - (void) setContent: (NSMutableDictionary *) newContent; diff --git a/src/kim/agent/mac/AuthenticationController.m b/src/kim/agent/mac/AuthenticationController.m index 1756e5aab..eaf4e6913 100644 --- a/src/kim/agent/mac/AuthenticationController.m +++ b/src/kim/agent/mac/AuthenticationController.m @@ -24,6 +24,7 @@ #import "AuthenticationController.h" #import "IPCClient.h" +#import "KerberosFormatters.h" #import "BadgedImageView.h" // to get kim_prompt_type enum @@ -47,46 +48,6 @@ * verify_password = " */ -#define client_name_keypath @"content.name" -#define client_path_keypath @"content.path" - -#define identity_string_keypath @"content.identity_string" -#define title_keypath @"content.title" -#define message_keypath @"content.message" -#define description_keypath @"content.description" - -#define username_keypath @"content.username" -#define realm_keypath @"content.realm" -#define realm_history_keypath @"content.realm_history" - -#define prompt_response_keypath @"content.prompt_response" -#define allow_save_password_keypath @"content.allow_save" -#define should_save_password_keypath @"content.save_response" - -#define password_expired_keypath @"content.expired" -#define old_password_keypath @"content.old_password" -#define new_password_keypath @"content.new_password" -#define verify_password_keypath @"content.verify_password" - -#define enable_identity_ok_keypath @"content.isPrincipalValid" -#define enable_prompt_ok_keypath @"content.isPromptValid" -#define change_password_ok_keypath @"content.isChangePasswordValid" - -#define options_keypath @"content.options" - -#define valid_lifetime_keypath @"content.valid_lifetime" -#define renewal_lifetime_keypath @"content.renewal_lifetime" -#define renewable_keypath @"content.renewable" -#define addressless_keypath @"content.addressless" -#define forwardable_keypath @"content.forwardable" - -#define min_valid_keypath @"content.minValidLifetime" -#define max_valid_keypath @"content.maxValidLifetime" -#define min_renewable_keypath @"content.minRenewableLifetime" -#define max_renewable_keypath @"content.maxRenewableLifetime" - -#define ACKVOContext @"authenticationController" - // localization keys and tables #define ACLocalizationTable @"AuthenticationController" @@ -102,6 +63,8 @@ @implementation AuthenticationController @synthesize associatedClient; +@synthesize favoriteIdentities; +@synthesize favoriteOptions; - (id) init { @@ -114,14 +77,13 @@ // We need to float over the loginwindow and SecurityAgent so use its hardcoded level. [[self window] setLevel:2003]; + lifetimeFormatter.displaySeconds = NO; + lifetimeFormatter.displayShortFormat = NO; + [glueController addObserver:self - forKeyPath:username_keypath + forKeyPath:identity_string_keypath options:NSKeyValueObservingOptionNew context:ACKVOContext]; - [glueController addObserver:self - forKeyPath:realm_keypath - options:NSKeyValueObservingOptionNew - context:ACKVOContext]; [glueController addObserver:self forKeyPath:prompt_response_keypath options:NSKeyValueObservingOptionNew @@ -143,23 +105,23 @@ - (void) dealloc { - [glueController removeObserver:self forKeyPath:username_keypath]; - [glueController removeObserver:self forKeyPath:realm_keypath]; + [glueController removeObserver:self forKeyPath:identity_string_keypath]; [glueController removeObserver:self forKeyPath:prompt_response_keypath]; [super dealloc]; } - (void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { + BOOL valid = NO; + if ([(NSString *) context isEqualToString:ACKVOContext]) { - if ([keyPath isEqualToString:username_keypath] || [keyPath isEqualToString:realm_keypath]) { - BOOL valid = [KIMUtilities validatePrincipalWithName:[glueController valueForKeyPath:username_keypath] - realm:[glueController valueForKeyPath:realm_keypath]]; + if ([keyPath isEqualToString:identity_string_keypath]) { + valid = [KIMUtilities validateIdentity:[glueController valueForKeyPath:identity_string_keypath]]; [glueController setValue:[NSNumber numberWithBool:valid] forKeyPath:enable_identity_ok_keypath]; } else if ([keyPath isEqualToString:prompt_response_keypath]) { - BOOL valid = ([[glueController valueForKeyPath:prompt_response_keypath] length] > 0); + valid = ([[glueController valueForKeyPath:prompt_response_keypath] length] > 0); [glueController setValue:[NSNumber numberWithBool:valid] forKeyPath:enable_prompt_ok_keypath]; } @@ -169,10 +131,8 @@ NSString *oldString = [glueController valueForKeyPath:old_password_keypath]; NSString *newString = [glueController valueForKeyPath:new_password_keypath]; NSString *verifyString = [glueController valueForKeyPath:verify_password_keypath]; - BOOL valid = ([oldString length] > 0 && - [newString length] > 0 && - [verifyString length] > 0 && - [newString isEqualToString:verifyString]); + valid = ([oldString length] > 0 && [newString length] > 0 && + [verifyString length] > 0 && [newString isEqualToString:verifyString]); [glueController setValue:[NSNumber numberWithBool:valid] forKeyPath:change_password_ok_keypath]; } @@ -190,11 +150,60 @@ - (void) showEnterIdentity { + kim_error err = KIM_NO_ERROR; NSString *key = (associatedClient.name) ? ACAppPrincReqKey : ACPrincReqKey; NSString *message = [NSString stringWithFormat: NSLocalizedStringFromTable(key, ACLocalizationTable, NULL), associatedClient.name]; + self.favoriteIdentities = [NSMutableArray array]; + self.favoriteOptions = [NSMutableDictionary dictionary]; + // get array of favorite identity strings and associated options + + if (!err) { + kim_preferences preferences = NULL; + kim_options kimOptions = NULL; + kim_count i; + kim_count count = 0; + + err = kim_preferences_create(&preferences); + + if (!err) { + err = kim_preferences_get_number_of_favorite_identities(preferences, + &count); + } + + for (i = 0; !err && i < count; i++) { + kim_identity kimIdentity = NULL; + kim_string display_string = NULL; + NSString *identityString = nil; + + err = kim_preferences_get_favorite_identity_at_index(preferences, + i, + &kimIdentity, + &kimOptions); + if (!err) { + err = kim_identity_get_display_string(kimIdentity, &display_string); + } + if (!err && display_string) { + identityString = [NSString stringWithUTF8String:display_string]; + [favoriteIdentities addObject:identityString]; + } + if (!err) { + [favoriteOptions setObject:[KIMUtilities dictionaryForKimOptions:kimOptions] + forKey:identityString]; + } + + kim_options_free(&kimOptions); + kim_string_free (&display_string); + kim_identity_free (&kimIdentity); + } + + kim_preferences_free(&preferences); + } + + [glueController setValue:favoriteIdentities forKeyPath:favorite_strings_keypath]; + // wake up the nib connections and adjust window size [self window]; // set up controls with info from associatedClient @@ -204,7 +213,7 @@ [glueController setValue:message forKeyPath:message_keypath]; [self showWindow:nil]; - [[self window] makeFirstResponder:usernameField]; + [[self window] makeFirstResponder:identityField]; } - (void) showAuthPrompt @@ -360,9 +369,19 @@ - (IBAction) showTicketOptions: (id) sender { + NSDictionary *options = nil; + // if this is a favorite, try to load its default options + [identityField validateEditing]; + + options = [favoriteOptions valueForKey:[identityField stringValue]]; + + if (!options) { + options = [[[glueController valueForKeyPath:options_keypath] mutableCopy] autorelease]; + } + + // else fallback to options passed from client // use a copy of the current options - [ticketOptionsController setContent: - [[[glueController valueForKeyPath:options_keypath] mutableCopy] autorelease]]; + [ticketOptionsController setContent:options]; [ticketOptionsController setValue:[NSNumber numberWithInteger:[KIMUtilities minValidLifetime]] forKeyPath:min_valid_keypath]; @@ -406,7 +425,42 @@ [ticketOptionsController setContent:nil]; } else { // replace existing options with new - [glueController setValue:[ticketOptionsController content] forKeyPath:options_keypath]; + // add to favorites if not already in list + + // replace options of existing if already in list + kim_error err = KIM_NO_ERROR; + kim_preferences prefs = NULL; + kim_identity identity = NULL; + kim_options options = NULL; + + [glueController setValue:[ticketOptionsController content] + forKeyPath:options_keypath]; + + err = kim_preferences_create(&prefs); + + if (!err) { + err = kim_identity_create_from_string(&identity, [[identityField stringValue] UTF8String]); + } + if (!err) { + options = [KIMUtilities kimOptionsForDictionary:[ticketOptionsController content]]; + } + if (!identity) { err = KIM_BAD_PRINCIPAL_STRING_ERR; } + if (!options) { err = KIM_BAD_OPTIONS_ERR; } + + if (!err && identity) { + err = kim_preferences_remove_favorite_identity(prefs, identity); + } + if (!err && identity && options) { + err = kim_preferences_add_favorite_identity(prefs, identity, options); + } + + if (!err) { + err = kim_preferences_synchronize(prefs); + } + + kim_preferences_free(&prefs); + kim_options_free(&options); + kim_identity_free(&identity); } [ticketOptionsSheet orderOut:nil]; } @@ -419,11 +473,8 @@ - (IBAction) enterIdentity: (id) sender { - NSString *usernameString = [glueController valueForKeyPath:username_keypath]; - NSString *realmString = [glueController valueForKeyPath:realm_keypath]; - NSString *identityString = [NSString stringWithFormat:@"%@@%@", usernameString, realmString]; + NSString *identityString = [glueController valueForKeyPath:identity_string_keypath]; NSDictionary *options = [glueController valueForKeyPath:options_keypath]; - NSLog(@"%s options == %@", __FUNCTION__, options); // the principal must already be valid to get this far [associatedClient didEnterIdentity:identityString options:options]; diff --git a/src/kim/agent/mac/IPCClient.h b/src/kim/agent/mac/IPCClient.h index 6a0654e98..172d79374 100644 --- a/src/kim/agent/mac/IPCClient.h +++ b/src/kim/agent/mac/IPCClient.h @@ -1,10 +1,27 @@ -// -// IPCClient.h -// Kerberos5 -// -// Created by Justin Anderson on 9/28/08. -// Copyright 2008 MIT. All rights reserved. -// +/* + * Copyright 2008 Massachusetts Institute of Technology. + * All Rights Reserved. + * + * Export of this software from the United States of America may + * require a specific license from the United States Government. + * It is the responsibility of any person or organization contemplating + * export to obtain such a license before exporting. + * + * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and + * distribute this software and its documentation for any purpose and + * without fee is hereby granted, provided that the above copyright + * notice appear in all copies and that both that copyright notice and + * this permission notice appear in supporting documentation, and that + * the name of M.I.T. not be used in advertising or publicity pertaining + * to distribution of the software without specific, written prior + * permission. Furthermore if you modify this software you must label + * your software as modified software and not distribute it in such a + * fashion that it might be confused with the original M.I.T. software. + * M.I.T. makes no representations about the suitability of + * this software for any purpose. It is provided "as is" without express + * or implied warranty. + */ + #import #import "KIMUtilities.h" @@ -40,7 +57,7 @@ - (kim_error) handleError: (NSDictionary *) info; - (void) didCancel; -- (void) didSelectIdentity: (NSString *) identityString; +- (void) didSelectIdentity: (NSString *) identityString options: (NSDictionary *) options; - (void) didEnterIdentity: (NSString *) identityString options: (NSDictionary *) options; - (void) didPromptForAuth: (NSString *) responseString saveResponse: (NSNumber *) saveResponse; - (void) didChangePassword: (NSString *) oldPassword diff --git a/src/kim/agent/mac/IPCClient.m b/src/kim/agent/mac/IPCClient.m index c49e35d04..814e1480f 100644 --- a/src/kim/agent/mac/IPCClient.m +++ b/src/kim/agent/mac/IPCClient.m @@ -1,10 +1,27 @@ -// -// IPCClient.m -// Kerberos5 -// -// Created by Justin Anderson on 9/28/08. -// Copyright 2008 MIT. All rights reserved. -// +/* + * Copyright 2008 Massachusetts Institute of Technology. + * All Rights Reserved. + * + * Export of this software from the United States of America may + * require a specific license from the United States Government. + * It is the responsibility of any person or organization contemplating + * export to obtain such a license before exporting. + * + * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and + * distribute this software and its documentation for any purpose and + * without fee is hereby granted, provided that the above copyright + * notice appear in all copies and that both that copyright notice and + * this permission notice appear in supporting documentation, and that + * the name of M.I.T. not be used in advertising or publicity pertaining + * to distribution of the software without specific, written prior + * permission. Furthermore if you modify this software you must label + * your software as modified software and not distribute it in such a + * fashion that it might be confused with the original M.I.T. software. + * M.I.T. makes no representations about the suitability of + * this software for any purpose. It is provided "as is" without express + * or implied warranty. + */ + #import "IPCClient.h" #import "SelectIdentityController.h" @@ -102,9 +119,10 @@ enum krb_agent_client_state { return 0; } -- (void) didSelectIdentity: (NSString *) identityString +- (void) didSelectIdentity: (NSString *) identityString options: (NSDictionary *) options { [self.currentInfo setObject:identityString forKey:@"identity_string"]; + [self.currentInfo setObject:options forKey:@"options"]; [KerberosAgentListener didSelectIdentity:self.currentInfo error:0]; diff --git a/src/kim/agent/mac/Identities.m b/src/kim/agent/mac/Identities.m index 2ead4e5e8..4d9aeb71c 100644 --- a/src/kim/agent/mac/Identities.m +++ b/src/kim/agent/mac/Identities.m @@ -512,7 +512,7 @@ if (self.kimIdentity) { err = kim_identity_get_components_string(self.kimIdentity, &display_string); } - + if (!err && display_string) { result = [NSString stringWithUTF8String:display_string]; } @@ -643,7 +643,7 @@ [parts addObject:[NSString stringWithFormat:@"%d minutes", minutes]]; } if ([parts count] == 0) { - [parts addObject:@"0 lifetime"]; + [parts addObject:@"0"]; } return [parts componentsJoinedByString:@", "]; } diff --git a/src/kim/agent/mac/KIMUtilities.h b/src/kim/agent/mac/KIMUtilities.h index 49871d9e6..4e448b9d5 100644 --- a/src/kim/agent/mac/KIMUtilities.h +++ b/src/kim/agent/mac/KIMUtilities.h @@ -1,10 +1,27 @@ -// -// KIMUtilities.h -// Kerberos5 -// -// Created by Justin Anderson on 9/28/08. -// Copyright 2008 MIT. All rights reserved. -// +/* + * Copyright 2008 Massachusetts Institute of Technology. + * All Rights Reserved. + * + * Export of this software from the United States of America may + * require a specific license from the United States Government. + * It is the responsibility of any person or organization contemplating + * export to obtain such a license before exporting. + * + * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and + * distribute this software and its documentation for any purpose and + * without fee is hereby granted, provided that the above copyright + * notice appear in all copies and that both that copyright notice and + * this permission notice appear in supporting documentation, and that + * the name of M.I.T. not be used in advertising or publicity pertaining + * to distribution of the software without specific, written prior + * permission. Furthermore if you modify this software you must label + * your software as modified software and not distribute it in such a + * fashion that it might be confused with the original M.I.T. software. + * M.I.T. makes no representations about the suitability of + * this software for any purpose. It is provided "as is" without express + * or implied warranty. + */ + #import #import @@ -12,6 +29,45 @@ #define VALID_LIFETIME_INCREMENT (5 * 60) #define RENEWABLE_LIFETIME_INCREMENT (15 * 60) +#define client_name_keypath @"content.name" +#define client_path_keypath @"content.path" + +#define identity_string_keypath @"content.identity_string" +#define favorite_strings_keypath @"content.favorite_identity_strings" +#define title_keypath @"content.title" +#define message_keypath @"content.message" +#define description_keypath @"content.description" + +#define prompt_response_keypath @"content.prompt_response" +#define allow_save_password_keypath @"content.allow_save" +#define should_save_password_keypath @"content.save_response" + +#define password_expired_keypath @"content.expired" +#define old_password_keypath @"content.old_password" +#define new_password_keypath @"content.new_password" +#define verify_password_keypath @"content.verify_password" + +#define enable_identity_ok_keypath @"content.isPrincipalValid" +#define enable_prompt_ok_keypath @"content.isPromptValid" +#define change_password_ok_keypath @"content.isChangePasswordValid" + +#define options_keypath @"content.options" + +#define valid_lifetime_keypath @"content.valid_lifetime" +#define renewal_lifetime_keypath @"content.renewal_lifetime" +#define renewable_keypath @"content.renewable" +#define addressless_keypath @"content.addressless" +#define forwardable_keypath @"content.forwardable" + +#define min_valid_keypath @"content.minValidLifetime" +#define max_valid_keypath @"content.maxValidLifetime" +#define min_renewable_keypath @"content.minRenewableLifetime" +#define max_renewable_keypath @"content.maxRenewableLifetime" + +#define ACKVOContext @"authenticationController" + + + #define log_kim_error_to_console(err)\ {\ NSLog(@"%s got error %@", __FUNCTION__, [KIMUtilities stringForLastKIMError:err]);\ @@ -24,10 +80,13 @@ NSLog(@"%s got error %@", __FUNCTION__, [KIMUtilities stringForLastKIMError:err] + (BOOL) validatePrincipalWithName: (NSString *) name realm: (NSString *) realm; -+ (NSDictionary *) dictionaryForKimOptions: (kim_options) options; ++ (BOOL) validateIdentity: (NSString *) identityString; ++ (NSDictionary *) dictionaryForKimOptions: (kim_options) options; + (kim_options) kimOptionsForDictionary: (NSDictionary *) aDict; ++ (NSDictionary *) dictionaryForKimSelectionHints: (kim_selection_hints) hints; + + (NSUInteger)minValidLifetime; + (NSUInteger)maxValidLifetime; + (NSUInteger)minRenewableLifetime; diff --git a/src/kim/agent/mac/KIMUtilities.m b/src/kim/agent/mac/KIMUtilities.m index 9319e676a..f450cdf2b 100644 --- a/src/kim/agent/mac/KIMUtilities.m +++ b/src/kim/agent/mac/KIMUtilities.m @@ -1,10 +1,26 @@ -// -// KIMUtilities.m -// Kerberos5 -// -// Created by Justin Anderson on 9/28/08. -// Copyright 2008 MIT. All rights reserved. -// +/* + * Copyright 2008 Massachusetts Institute of Technology. + * All Rights Reserved. + * + * Export of this software from the United States of America may + * require a specific license from the United States Government. + * It is the responsibility of any person or organization contemplating + * export to obtain such a license before exporting. + * + * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and + * distribute this software and its documentation for any purpose and + * without fee is hereby granted, provided that the above copyright + * notice appear in all copies and that both that copyright notice and + * this permission notice appear in supporting documentation, and that + * the name of M.I.T. not be used in advertising or publicity pertaining + * to distribution of the software without specific, written prior + * permission. Furthermore if you modify this software you must label + * your software as modified software and not distribute it in such a + * fashion that it might be confused with the original M.I.T. software. + * M.I.T. makes no representations about the suitability of + * this software for any purpose. It is provided "as is" without express + * or implied warranty. + */ #import "KIMUtilities.h" @@ -29,16 +45,29 @@ realm: (NSString *) realm { kim_error err = KIM_NO_ERROR; - kim_identity identity = NULL; - NSString *principal = nil; + NSString *identityString = nil; if (!name || !realm || [name length] == 0) { err = KIM_BAD_PRINCIPAL_STRING_ERR; } if (!err) { - principal = [[NSString alloc] initWithFormat:@"%@@%@", name, realm]; - err = kim_identity_create_from_string(&identity, [principal UTF8String]); - [principal release]; + identityString = [[NSString alloc] initWithFormat:@"%@@%@", name, realm]; + err = [KIMUtilities validateIdentity:identityString]; + [identityString release]; + } + + return (err == KIM_NO_ERROR); +} + ++ (BOOL) validateIdentity: (NSString *) identityString +{ + kim_error err = KIM_NO_ERROR; + kim_identity identity = NULL; + if (!identityString || [identityString length] <= 1) { + err = KIM_BAD_PRINCIPAL_STRING_ERR; + } + if (!err) { + err = kim_identity_create_from_string(&identity, [identityString UTF8String]); } if (!identity) { err = KIM_BAD_PRINCIPAL_STRING_ERR; @@ -167,6 +196,65 @@ return options; } ++ (NSDictionary *) dictionaryForKimSelectionHints: (kim_selection_hints) hints +{ + kim_error err = KIM_NO_ERROR; + + NSMutableDictionary *newDict = [NSMutableDictionary dictionaryWithCapacity:20]; + + kim_string explanation = NULL; + kim_options options = NULL; + kim_string service_identity = NULL; + kim_string client_realm = NULL; + kim_string user = NULL; + kim_string service_realm = NULL; + kim_string service = NULL; + kim_string server = NULL; + + if (!err) { + err = kim_selection_hints_get_explanation(hints, &explanation); + [newDict setValue:(explanation) ? [NSString stringWithUTF8String:explanation] : @"" + forKey:@"explanation"]; + } + if (!err) { + err = kim_selection_hints_get_options(hints, &options); + [newDict setValue:[KIMUtilities dictionaryForKimOptions:options] + forKey:@"options"]; + } + if (!err) { + err = kim_selection_hints_get_hint(hints, kim_hint_key_client_realm, &client_realm); + [newDict setValue:(client_realm) ? [NSString stringWithUTF8String:client_realm] : @"" + forKey:@"client_realm"]; + } + if (!err) { + err = kim_selection_hints_get_hint(hints, kim_hint_key_user, &user); + [newDict setValue:(user) ? [NSString stringWithUTF8String:user] : @"" + forKey:@"user"]; + } + if (!err) { + err = kim_selection_hints_get_hint(hints, kim_hint_key_service_realm, &service_realm); + [newDict setValue:(service_realm) ? [NSString stringWithUTF8String:service_realm] : @"" + forKey:@"service_realm"]; + } + if (!err) { + err = kim_selection_hints_get_hint(hints, kim_hint_key_service, &service); + [newDict setValue:(service) ? [NSString stringWithUTF8String:service] : @"" + forKey:@"service"]; + } + if (!err) { + err = kim_selection_hints_get_hint(hints, kim_hint_key_server, &server); + [newDict setValue:(server) ? [NSString stringWithUTF8String:server] : @"" + forKey:@"server"]; + } + if (!err) { + err = kim_selection_hints_get_hint(hints, kim_hint_key_service_identity, &service_identity); + [newDict setValue:(service_identity) ? [NSString stringWithUTF8String:service_identity] : @"" + forKey:@"service_identity"]; + } + + return newDict; +} + + (NSUInteger)minValidLifetime { kim_error err = KIM_NO_ERROR; diff --git a/src/kim/agent/mac/KerberosAgentController.m b/src/kim/agent/mac/KerberosAgentController.m index 5e973ea5e..b392dd40a 100644 --- a/src/kim/agent/mac/KerberosAgentController.m +++ b/src/kim/agent/mac/KerberosAgentController.m @@ -29,7 +29,7 @@ #import "IPCClient.h" #import "ServerDemux.h" -#define SECONDS_BEFORE_AUTO_QUIT_ON_START 5 +#define SECONDS_BEFORE_AUTO_QUIT_ON_START 600 #define SECONDS_BEFORE_AUTO_QUIT_ON_NO_CLIENTS 1 @implementation KerberosAgentController diff --git a/src/kim/agent/mac/KerberosAgentListener.h b/src/kim/agent/mac/KerberosAgentListener.h index 3c0fc8ee3..2d9378aff 100644 --- a/src/kim/agent/mac/KerberosAgentListener.h +++ b/src/kim/agent/mac/KerberosAgentListener.h @@ -1,10 +1,27 @@ -// -// KerberosAgentListener.h -// Kerberos5 -// -// Created by Justin Anderson on 9/28/08. -// Copyright 2008 MIT. All rights reserved. -// +/* + * Copyright 2008 Massachusetts Institute of Technology. + * All Rights Reserved. + * + * Export of this software from the United States of America may + * require a specific license from the United States Government. + * It is the responsibility of any person or organization contemplating + * export to obtain such a license before exporting. + * + * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and + * distribute this software and its documentation for any purpose and + * without fee is hereby granted, provided that the above copyright + * notice appear in all copies and that both that copyright notice and + * this permission notice appear in supporting documentation, and that + * the name of M.I.T. not be used in advertising or publicity pertaining + * to distribution of the software without specific, written prior + * permission. Furthermore if you modify this software you must label + * your software as modified software and not distribute it in such a + * fashion that it might be confused with the original M.I.T. software. + * M.I.T. makes no representations about the suitability of + * this software for any purpose. It is provided "as is" without express + * or implied warranty. + */ + #import #import diff --git a/src/kim/agent/mac/KerberosAgentListener.m b/src/kim/agent/mac/KerberosAgentListener.m index fb87c02c3..019fbb4ff 100644 --- a/src/kim/agent/mac/KerberosAgentListener.m +++ b/src/kim/agent/mac/KerberosAgentListener.m @@ -1,10 +1,27 @@ -// -// KerberosAgentListener.m -// Kerberos5 -// -// Created by Justin Anderson on 9/28/08. -// Copyright 2008 MIT. All rights reserved. -// +/* + * Copyright 2008 Massachusetts Institute of Technology. + * All Rights Reserved. + * + * Export of this software from the United States of America may + * require a specific license from the United States Government. + * It is the responsibility of any person or organization contemplating + * export to obtain such a license before exporting. + * + * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and + * distribute this software and its documentation for any purpose and + * without fee is hereby granted, provided that the above copyright + * notice appear in all copies and that both that copyright notice and + * this permission notice appear in supporting documentation, and that + * the name of M.I.T. not be used in advertising or publicity pertaining + * to distribution of the software without specific, written prior + * permission. Furthermore if you modify this software you must label + * your software as modified software and not distribute it in such a + * fashion that it might be confused with the original M.I.T. software. + * M.I.T. makes no representations about the suitability of + * this software for any purpose. It is provided "as is" without express + * or implied warranty. + */ + #import "KerberosAgentListener.h" #import "KIMUtilities.h" @@ -171,17 +188,12 @@ static KerberosAgentListener *sharedListener = nil; replyPort: (mach_port_t) reply_port hints: (kim_selection_hints) hints { - kim_error err = KIM_NO_ERROR; - kim_selection_hints new_hints = NULL; NSDictionary *info = nil; - // new hints will be freed by main thread - err = kim_selection_hints_copy(&new_hints, hints); - info = [[NSDictionary alloc] initWithObjectsAndKeys: [NSNumber numberWithInteger:client_port], @"client_port", [NSNumber numberWithInteger:reply_port], @"reply_port", - [NSValue valueWithPointer:new_hints], @"hints", + [KIMUtilities dictionaryForKimSelectionHints:hints], @"hints", nil]; [[NSApp delegate] performSelectorOnMainThread:@selector(selectIdentity:) @@ -209,9 +221,6 @@ static KerberosAgentListener *sharedListener = nil; options = [KIMUtilities kimOptionsForDictionary:[info objectForKey:@"options"]]; } - log_kim_error_to_console(err); - log_kim_error_to_console(error); - if (!err) { err = kim_handle_reply_select_identity(reply_port, identity, options, error); } diff --git a/src/kim/agent/mac/KerberosFormatters.m b/src/kim/agent/mac/KerberosFormatters.m index b8a5b3aa4..dc4092140 100644 --- a/src/kim/agent/mac/KerberosFormatters.m +++ b/src/kim/agent/mac/KerberosFormatters.m @@ -49,11 +49,13 @@ { NSString *result = nil; - if (anObject == nil || ![anObject respondsToSelector:@selector(timeIntervalSinceNow)]) { - result = @""; - } - else { - result = [self stringForLifetime:(time_t)[(NSDate *)anObject timeIntervalSinceNow]]; + if (anObject) { + if ([anObject respondsToSelector:@selector(timeIntervalSinceNow)]) { + result = [self stringForLifetime:(time_t)[(NSDate *)anObject timeIntervalSinceNow]]; + } + else if ([anObject respondsToSelector:@selector(unsignedIntegerValue)]) { + result = [self stringForLifetime:(time_t)[(NSNumber *)anObject unsignedIntegerValue]]; + } } return result; diff --git a/src/kim/agent/mac/SelectIdentityController.h b/src/kim/agent/mac/SelectIdentityController.h index 2251d2773..9b78bd7b2 100644 --- a/src/kim/agent/mac/SelectIdentityController.h +++ b/src/kim/agent/mac/SelectIdentityController.h @@ -39,7 +39,6 @@ IBOutlet NSTextField *explanationTextField; IBOutlet NSTableView *identityTableView; - IBOutlet NSTableColumn *identityTableColumn; IBOutlet NSButton *addIdentityButton; IBOutlet NSPopUpButton *actionPopupButton; IBOutlet NSButton *selectIdentityButton; @@ -48,16 +47,23 @@ Identities *identities; NSTimer *refreshTimer; + IBOutlet NSObjectController *glueController; + IBOutlet NSWindow *identityOptionsWindow; IBOutlet NSObjectController *identityOptionsController; - IBOutlet NSTextField *nameField; - IBOutlet NSTextField *realmField; + IBOutlet NSTextField *identityField; + IBOutlet NSTextField *staticIdentityField; + + IBOutlet NSSlider *validLifetimeSlider; + IBOutlet NSSlider *renewableLifetimeSlider; IBOutlet NSButton *ticketOptionsOkButton; } @property (readwrite, retain) IPCClient *associatedClient; +- (void) setContent: (NSMutableDictionary *) newContent; + - (IBAction) newIdentity: (id) sender; - (IBAction) addToFavorites: (id) sender; - (IBAction) removeFromFavorites: (id) sender; @@ -70,6 +76,7 @@ - (IBAction) select: (id) sender; - (IBAction) cancel: (id) sender; +- (IBAction) sliderDidChange: (id) sender; - (void)controlTextDidChange:(NSNotification *)aNotification; - (void) showOptions: (NSString *) contextInfo; diff --git a/src/kim/agent/mac/SelectIdentityController.m b/src/kim/agent/mac/SelectIdentityController.m index 897e0dcc7..eafd3d462 100644 --- a/src/kim/agent/mac/SelectIdentityController.m +++ b/src/kim/agent/mac/SelectIdentityController.m @@ -33,16 +33,6 @@ // --------------------------------------------------------------------------- -- (id) initWithWindowNibName: (NSString *) windowNibName -{ - if ((self = [super initWithWindowNibName: windowNibName])) { - } - - return self; -} - -// --------------------------------------------------------------------------- - - (id) init { return [self initWithWindowNibName: @"SelectIdentity"]; @@ -86,10 +76,18 @@ associatedClient.name]; } [headerTextField setStringValue:message]; + [explanationTextField setStringValue:@"explanation!"]; } // --------------------------------------------------------------------------- +- (void) setContent: (NSMutableDictionary *) newContent +{ + [self window]; // wake up the nib connections +// [glueController setContent:newContent]; +} + +// --------------------------------------------------------------------------- - (IBAction) newIdentity: (id) sender { @@ -138,7 +136,8 @@ } selectedIdentity = [[identityArrayController selectedObjects] lastObject]; - [associatedClient didSelectIdentity: selectedIdentity.principalString]; + [associatedClient didSelectIdentity: selectedIdentity.principalString + options: [identityOptionsController valueForKeyPath:@"content.options"]]; } // --------------------------------------------------------------------------- @@ -146,6 +145,7 @@ - (IBAction) cancel: (id) sender { [associatedClient didCancel]; + [self close]; } // --------------------------------------------------------------------------- @@ -183,19 +183,21 @@ - (IBAction) doneOptions: (id) sender { - Identity *anIdentity = identityOptionsController.content; +// Identity *anIdentity = identityOptionsController.content; - [anIdentity setPrincipalComponents: [nameField stringValue] - realm: [realmField stringValue]]; [NSApp endSheet: identityOptionsWindow]; } +- (IBAction) sliderDidChange: (id) sender +{ + +} + - (void)controlTextDidChange:(NSNotification *)aNotification { - BOOL valid = [KIMUtilities validatePrincipalWithName:[nameField stringValue] - realm:[realmField stringValue]]; - [ticketOptionsOkButton setEnabled:valid]; +// BOOL valid = [KIMUtilities validateIdentity:]; + [ticketOptionsOkButton setEnabled:false]; [ticketOptionsOkButton setNeedsDisplay]; } @@ -205,8 +207,28 @@ { Identity *anIdentity = identityOptionsController.content; - [nameField setStringValue:anIdentity.componentsString]; - [realmField setStringValue:anIdentity.realmString]; + [identityField setStringValue:anIdentity.principalString]; + [staticIdentityField setStringValue:anIdentity.principalString]; + + // use a copy of the current options + [identityOptionsController setContent: + [[[glueController valueForKeyPath:options_keypath] mutableCopy] autorelease]]; + + [identityOptionsController setValue:[NSNumber numberWithInteger:[KIMUtilities minValidLifetime]] + forKeyPath:min_valid_keypath]; + [identityOptionsController setValue:[NSNumber numberWithInteger:[KIMUtilities maxValidLifetime]] + forKeyPath:max_valid_keypath]; + [identityOptionsController setValue:[NSNumber numberWithInteger:[KIMUtilities minRenewableLifetime]] + forKeyPath:min_renewable_keypath]; + [identityOptionsController setValue:[NSNumber numberWithInteger:[KIMUtilities maxRenewableLifetime]] + forKeyPath:max_renewable_keypath]; + + [validLifetimeSlider setIntegerValue: + [[identityOptionsController valueForKeyPath:valid_lifetime_keypath] integerValue]]; + [renewableLifetimeSlider setIntegerValue: + [[identityOptionsController valueForKeyPath:renewal_lifetime_keypath] integerValue]]; + [self sliderDidChange:validLifetimeSlider]; + [self sliderDidChange:renewableLifetimeSlider]; [NSApp beginSheet: identityOptionsWindow modalForWindow: [self window] diff --git a/src/kim/agent/mac/ServerDemux.m b/src/kim/agent/mac/ServerDemux.m index ea1943592..51759801a 100644 --- a/src/kim/agent/mac/ServerDemux.m +++ b/src/kim/agent/mac/ServerDemux.m @@ -461,7 +461,7 @@ static int32_t kim_handle_request_handle_error (mach_port_t in_client_port, /* Can be empty string "" if there is no identity */ if (!err && !identity_string[0]) { k5_ipc_stream_free_string (identity_string); - identity_string = KIM_IDENTITY_ANY; + identity_string = NULL; } } diff --git a/src/kim/agent/mac/resources/English.lproj/Authentication.xib b/src/kim/agent/mac/resources/English.lproj/Authentication.xib index 06056ee68..e5273b70c 100644 --- a/src/kim/agent/mac/resources/English.lproj/Authentication.xib +++ b/src/kim/agent/mac/resources/English.lproj/Authentication.xib @@ -8,11 +8,7 @@ 352.00 YES - - - - - + @@ -59,6 +55,8 @@ max_renewal_lifetime max_valid_lifetime min_valid_lifetime + identity_string + favorite_identity_strings YES @@ -86,7 +84,7 @@ 264 - {{101, 126}, {382, 54}} + {{101, 103}, {382, 54}} YES @@ -119,18 +117,20 @@ - + 290 - {{104, 88}, {376, 22}} + {{104, 59}, {379, 26}} YES - - -1804468671 + + 343014976 272630784 - + + + - + YES 6 @@ -141,49 +141,10 @@ MQA - - 6 - System - textColor - - - - - - - 292 - {{17, 90}, {82, 17}} - - YES - - 67239424 - 71303168 - Name: - - - - - - - - - 290 - {{104, 56}, {379, 26}} - - YES - - 343014976 - 272630784 - - - - - - YES - 5 YES + YES @@ -261,13 +222,13 @@ 292 - {{17, 61}, {82, 17}} + {{17, 64}, {82, 17}} YES 67239424 71303168 - Realm: + Identity: @@ -277,7 +238,7 @@ 289 - {{388, 12}, {98, 32}} + {{388, 15}, {98, 32}} YES @@ -298,7 +259,7 @@ 289 - {{295, 12}, {93, 32}} + {{295, 15}, {93, 32}} YES @@ -319,14 +280,14 @@ 268 - {{20, 126}, {64, 64}} + {{20, 103}, {64, 64}} BadgedImageView 292 - {{20, 17}, {38, 26}} + {{20, 20}, {38, 26}} YES @@ -420,7 +381,7 @@ - {500, 210} + {500, 187} NSView @@ -434,6 +395,7 @@ 266 {{104, 82}, {376, 22}} + YES -1804468671 @@ -443,7 +405,12 @@ YES - + + 6 + System + textColor + + @@ -451,6 +418,7 @@ 289 {{388, 12}, {98, 32}} + YES 67239424 @@ -472,6 +440,7 @@ 289 {{295, 12}, {93, 32}} + YES 67239424 @@ -493,6 +462,7 @@ 266 {{101, 126}, {382, 41}} + YES 67239424 @@ -509,6 +479,7 @@ 268 {{17, 84}, {80, 17}} + YES 68288064 @@ -525,6 +496,7 @@ 290 {{102, 58}, {380, 18}} + YES -2080244224 @@ -552,15 +524,17 @@ 268 {{20, 126}, {64, 64}} + BadgedImageView {500, 210} + NSView - + 274 YES @@ -684,11 +658,10 @@ {500, 210} - NSView - + 286 YES @@ -877,7 +850,6 @@ {500, 230} - NSView @@ -967,10 +939,9 @@ {600, 400} {484, 199} - + 256 {500, 210} - {{0, 0}, {1920, 1178}} {484, 221} @@ -1210,26 +1181,13 @@ {430, 305} {3.40282e+38, 3.40282e+38} + + KerberosTimeFormatter + YES - - - nextKeyView - - - - 300173 - - - - nextKeyView - - - - 300174 - identityView @@ -1326,22 +1284,6 @@ 300339 - - - contentValues: selection.realm_history - - - - - - contentValues: selection.realm_history - contentValues - selection.realm_history - 2 - - - 300342 - value: selection.message @@ -1374,47 +1316,6 @@ 300348 - - - value: selection.username - - - - - - value: selection.username - value - selection.username - - NSContinuouslyUpdatesValue - - - 2 - - - 300349 - - - - value: selection.realm - - - - - - value: selection.realm - value - selection.realm - - NSContinuouslyUpdatesValue - - - - 2 - - - 300350 - enabled: selection.isPrincipalValid @@ -1431,14 +1332,6 @@ 300351 - - - usernameField - - - - 300352 - enterBadge @@ -1516,7 +1409,7 @@ selection.prompt_response NSContinuouslyUpdatesValue - + 2 @@ -2025,38 +1918,6 @@ 300497 - - - value: selection.renewal_lifetime - - - - - - value: selection.renewal_lifetime - value - selection.renewal_lifetime - 2 - - - 300500 - - - - value: selection.valid_lifetime - - - - - - value: selection.valid_lifetime - value - selection.valid_lifetime - 2 - - - 300501 - showTicketOptions: @@ -2113,6 +1974,115 @@ 300509 + + + formatter + + + + 300511 + + + + identityField + + + + 300513 + + + + contentValues: selection.favorite_identity_strings + + + + + + contentValues: selection.favorite_identity_strings + contentValues + selection.favorite_identity_strings + 2 + + + 300515 + + + + value: selection.identity_string + + + + + + value: selection.identity_string + value + selection.identity_string + + NSContinuouslyUpdatesValue + + + + 2 + + + 300516 + + + + value: selection.valid_lifetime + + + + + + value: selection.valid_lifetime + value + selection.valid_lifetime + + NSContinuouslyUpdatesValue + + + 2 + + + 300517 + + + + value: selection.renewal_lifetime + + + + + + value: selection.renewal_lifetime + value + selection.renewal_lifetime + + NSContinuouslyUpdatesValue + + + 2 + + + 300518 + + + + lifetimeFormatter + + + + 300519 + + + + formatter + + + + 300520 + @@ -2169,8 +2139,6 @@ - - @@ -2206,24 +2174,6 @@ - - 300159 - - - YES - - - - - - 300160 - - - YES - - - - 300165 @@ -2257,16 +2207,6 @@ - - 300170 - - - - - 300171 - - - 300168 @@ -2791,9 +2731,9 @@ - + @@ -2953,6 +2893,11 @@ + + 300510 + + + @@ -2977,10 +2922,6 @@ 300157.IBPluginDependency 300158.IBPluginDependency 300158.ImportedFromIB2 - 300159.IBPluginDependency - 300159.ImportedFromIB2 - 300160.IBPluginDependency - 300160.ImportedFromIB2 300161.IBPluginDependency 300161.ImportedFromIB2 300162.IBPluginDependency @@ -3098,6 +3039,7 @@ 300464.IBPluginDependency 300469.IBPluginDependency 300502.IBPluginDependency + 300510.IBPluginDependency YES @@ -3115,7 +3057,7 @@ {484, 199} com.apple.InterfaceBuilder.CocoaPlugin - {{602, 432}, {500, 210}} + {{602, 455}, {500, 187}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -3126,10 +3068,6 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin {{477, 611}, {500, 210}} com.apple.InterfaceBuilder.CocoaPlugin NSSecureTextField @@ -3207,9 +3145,9 @@ com.apple.InterfaceBuilder.CocoaPlugin - {{979, 209}, {430, 283}} + {{647, 412}, {430, 283}} com.apple.InterfaceBuilder.CocoaPlugin - {{979, 209}, {430, 283}} + {{647, 412}, {430, 283}} @@ -3240,6 +3178,7 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin @@ -3262,7 +3201,7 @@ - 300509 + 300520 @@ -3309,7 +3248,9 @@ errorView expiredPasswordView glueController + identityField identityView + lifetimeFormatter oldPasswordField passwordBadge passwordField @@ -3321,7 +3262,6 @@ samView ticketOptionsController ticketOptionsSheet - usernameField validLifetimeSlider @@ -3334,7 +3274,9 @@ NSView NSView NSObjectController + NSTextField NSView + KerberosTimeFormatter NSTextField BadgedImageView NSTextField @@ -3346,7 +3288,6 @@ NSView NSObjectController NSWindow - NSTextField NSSlider @@ -3371,6 +3312,14 @@ + + KerberosTimeFormatter + NSFormatter + + IBProjectSource + ../Sources/kim/agent/mac/KerberosFormatters.h + + 0 diff --git a/src/kim/agent/mac/resources/English.lproj/SelectIdentity.xib b/src/kim/agent/mac/resources/English.lproj/SelectIdentity.xib index 3a1fb160e..d38d944c9 100644 --- a/src/kim/agent/mac/resources/English.lproj/SelectIdentity.xib +++ b/src/kim/agent/mac/resources/English.lproj/SelectIdentity.xib @@ -8,8 +8,8 @@ 352.00 YES - + YES @@ -505,7 +505,7 @@ 7 2 - {{196, 132}, {427, 378}} + {{196, 162}, {427, 348}} 603979776 Window NSWindow @@ -519,7 +519,7 @@ 266 - {{69, 336}, {338, 22}} + {{78, 306}, {338, 22}} YES @@ -536,7 +536,7 @@ textBackgroundColor - + 6 System textColor @@ -547,53 +547,19 @@ 268 - {{19, 338}, {45, 17}} + {{17, 308}, {60, 17}} YES 68288064 71304192 - Name: + Identity: - - - 266 - {{69, 306}, {338, 22}} - - YES - - -1804468671 - 272630784 - - - REALM.ORG - - YES - - - - - - - 268 - {{17, 308}, {47, 17}} - - YES - - 68288064 - 71304192 - Realm: - - - - - - 266 @@ -873,7 +839,7 @@ -2147483380 - {{66, 338}, {344, 17}} + {{75, 308}, {344, 17}} YES @@ -886,24 +852,8 @@ - - - -2147483380 - {{66, 308}, {344, 17}} - - YES - - 68288064 - 272630784 - Label - - - - - - - {427, 378} + {427, 348} {{0, 0}, {1280, 778}} @@ -912,23 +862,28 @@ YES - realmString - isForwardable - isProxiable - isRenewable + forwardable + renewable renewableLifetime - componentsString + identityString favorite - isAddressless + addressless validLifetime renewableLifetimeString validLifetimeString hasCCache + minValidLifetime + maxValidLifetime + maxRenewableLifetime Identity YES + + YES + + YES @@ -938,6 +893,7 @@ maximumRenewableLifetime favorite identities + minRenewableLifetime Identities @@ -1276,56 +1232,6 @@ 300369 - - - maxValue: selection.maximumValidLifetime - - - - - - maxValue: selection.maximumValidLifetime - maxValue - selection.maximumValidLifetime - 2 - - - 300372 - - - - minValue: selection.minimumValidLifetime - - - - - - minValue: selection.minimumValidLifetime - minValue - selection.minimumValidLifetime - - 2 - - - 300373 - - - - value: selection.validLifetime - - - - - - value: selection.validLifetime - value - selection.validLifetime - - 2 - - - 300378 - identitiesController @@ -1334,56 +1240,6 @@ 300380 - - - maxValue: selection.maximumRenewableLifetime - - - - - - maxValue: selection.maximumRenewableLifetime - maxValue - selection.maximumRenewableLifetime - 2 - - - 300381 - - - - minValue: selection.minimumRenewableLifetime - - - - - - minValue: selection.minimumRenewableLifetime - minValue - selection.minimumRenewableLifetime - - 2 - - - 300384 - - - - value: selection.renewableLifetime - - - - - - value: selection.renewableLifetime - value - selection.renewableLifetime - - 2 - - - 300385 - value: selection.renewableLifetimeString @@ -1416,22 +1272,6 @@ 300388 - - - nameField - - - - 300396 - - - - realmField - - - - 300397 - value: selection.componentsString @@ -1448,58 +1288,6 @@ 300404 - - - value: selection.realmString - - - - - - value: selection.realmString - value - selection.realmString - 2 - - - 300411 - - - - hidden: selection.hasCCache - - - - - - hidden: selection.hasCCache - hidden - selection.hasCCache - 2 - - - 300419 - - - - hidden: selection.hasCCache - - - - - - hidden: selection.hasCCache - hidden - selection.hasCCache - - NSValueTransformerName - NSNegateBoolean - - 2 - - - 300420 - hidden: selection.hasCCache @@ -1663,18 +1451,124 @@ delegate - + - 300460 + 300461 + + + + maxValue: selection.maxValidLifetime + + + + + + maxValue: selection.maxValidLifetime + maxValue + selection.maxValidLifetime + 2 + + + 300470 + + + + minValue: selection.minValidLifetime + + + + + + minValue: selection.minValidLifetime + minValue + selection.minValidLifetime + + 2 + + + 300471 - delegate - - + validLifetimeSlider + + - 300461 + 300473 + + + + renewableLifetimeSlider + + + + 300474 + + + + sliderDidChange: + + + + 300475 + + + + sliderDidChange: + + + + 300476 + + + + maxValue: selection.maxRenewableLifetime + + + + + + maxValue: selection.maxRenewableLifetime + maxValue + selection.maxRenewableLifetime + 2 + + + 300481 + + + + minValue: selection.minRenewableLifetime + + + + + + minValue: selection.minRenewableLifetime + minValue + selection.minRenewableLifetime + + 2 + + + 300482 + + + + staticIdentityField + + + + 300483 + + + + identityField + + + + 300484 @@ -1920,16 +1814,13 @@ YES - - - - - + + @@ -1950,24 +1841,6 @@ - - 300298 - - - YES - - - - - - 300299 - - - YES - - - - 300300 @@ -1996,16 +1869,6 @@ - - 300304 - - - - - 300305 - - - 300307 @@ -2186,34 +2049,6 @@ Identities Controller - - 300402 - - - YES - - - - - - 300403 - - - - - 300407 - - - YES - - - - - - 300408 - - - 300426 @@ -2264,6 +2099,26 @@ + + 300402 + + + YES + + + + + + 300403 + + + + + 300462 + + + Glue Controller + @@ -2306,14 +2161,10 @@ 300295.IBPluginDependency 300296.IBPluginDependency 300296.ImportedFromIB2 - 300298.IBPluginDependency - 300299.IBPluginDependency 300300.IBPluginDependency 300301.IBPluginDependency 300302.IBPluginDependency 300303.IBPluginDependency - 300304.IBPluginDependency - 300305.IBPluginDependency 300307.IBPluginDependency 300307.ImportedFromIB2 300308.IBPluginDependency @@ -2342,8 +2193,6 @@ 300370.IBPluginDependency 300402.IBPluginDependency 300403.IBPluginDependency - 300407.IBPluginDependency - 300408.IBPluginDependency 300426.IBPluginDependency 300427.IBPluginDependency 300428.IBEditorWindowLastContentRect @@ -2352,6 +2201,7 @@ 300430.IBPluginDependency 300431.IBPluginDependency 300432.IBPluginDependency + 300462.IBPluginDependency 5.IBEditorWindowLastContentRect 5.IBPluginDependency 5.IBWindowTemplateEditedContentRect @@ -2396,9 +2246,9 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{553, 305}, {427, 378}} + {{553, 335}, {427, 348}} com.apple.InterfaceBuilder.CocoaPlugin - {{553, 305}, {427, 378}} + {{553, 335}, {427, 348}} {10000, 354} @@ -2410,10 +2260,6 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -2443,14 +2289,13 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin {{535, 102}, {198, 83}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin {{499, 142}, {491, 316}} com.apple.InterfaceBuilder.CocoaPlugin {{499, 142}, {491, 316}} @@ -2487,7 +2332,7 @@ - 300461 + 300484 @@ -2537,6 +2382,7 @@ removeFromFavorites: resetOptions: select: + sliderDidChange: YES @@ -2549,6 +2395,7 @@ id id id + id @@ -2559,18 +2406,20 @@ addIdentityButton cancelButton explanationTextField + glueController headerTextField identitiesController identityArrayController + identityField identityOptionsController identityOptionsWindow - identityTableColumn identityTableView kerberosIconImageView - nameField - realmField + renewableLifetimeSlider selectIdentityButton + staticIdentityField ticketOptionsOkButton + validLifetimeSlider YES @@ -2578,18 +2427,20 @@ NSButton NSButton NSTextField + NSObjectController NSTextField NSObjectController NSArrayController + NSTextField NSObjectController NSWindow - NSTableColumn NSTableView BadgedImageView - NSTextField - NSTextField + NSSlider NSButton + NSTextField NSButton + NSSlider -- 2.26.2