I'm building a small application which logs in to a remote server over an HTTP-based API. Authentication is via a username and password in an HTTP PUT. Nice and simple. I want to offer users the ability to save credentials, and I want the saved credentials to show up in Keychain Access, ideally just like credentials saved in Safari. My question is about how to recognize when the user has made the decision not to save credentials for a site.
When Safari prompts you to make a credential saving decision and you tell it "Never for This Website", it appears to save a Keychain item with the username "Passwords not saved". The item's name is in the form "<server> (Passwords not saved)". It looks to me like any other saved credential. Is there something special I've missed about these items, or is the username "Passwords not saved" just recognized and handled in a special way?
Thanks for all the background info. You wrote:
For now, I'm trying to understand the right way to flag that the user doesn't want credentials saved for a given server.
I think the droid you’re looking for is
kSecAttrIsNegative
.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"