Proper way to use NSUserDefaults + Bindings + Keychain
Proper way to use NSUserDefaults + Bindings + Keychain
- Subject: Proper way to use NSUserDefaults + Bindings + Keychain
- From: Andrei Tchijov <email@hidden>
- Date: Fri, 17 Aug 2007 13:52:59 -0400
Hi,
I have an application which needs to be able to store standard
network login information ( host name, port, user name, password ).
I am using NSUserDefaults with Bindings to "link" appropriate fields
from the GUI to "host name", "port" and "user name". For "password" I
am using none-NSUserDefaults related binding which uses Keychain APIs
to store password. It works, but I am far from been happy. My
biggest problem is this: Lets imagine following scenario:
1) Some one enters host name + port + user name
2) Then he/she enters password - which gets stored in Keychain as a
password for particular host name + port + user name
3) Some one change host name.
The way it works now, GUI "forgets" password (because it was
associated with "old" host name ) and we end up having "orphan"
password in Keychain.
I will greatly appreciate if some one can enlighten me how to avoid
this problem. I imagine that this is quite common situation and it
should have simple and/or standard solution.
You comments will be greatly appreciated.
Andrei Tchijov
Leaping Bytes, LLC
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden