Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving Authentication Credentials #2

Closed
wants to merge 3 commits into from

Conversation

dlinsin
Copy link
Contributor

@dlinsin dlinsin commented Oct 7, 2012

This introduces saving the Authentication Credentials in iOS's Keychain.

It uses a submodule which simplifies the Keychain access tremendously: UICKeyChainStore. Unfortunately, it's not ARC compatible so I had to add the flag -fno-objc-arc to the two source files.

The credentials are stored once the authorization succeeded and used as soon as an TPTentHTTPClientinstance is created with the same URL.

Unfortunately, I had to change AccountViewController a little bit to adjust the flow.

Note: there is no error handling or logging out! You'd basically have to login with a different entity in order to overwrite the Keychain entries!

@followben
Copy link
Owner

Thanks for this @dlinsin.

I'm quite keen to reduce dependencies on external libraries to just AFNetworking (had planned to deprecate the need for SSToolkit shortly).

With that in mind, I've implemented something functionally similar using Apple's Keychain API: 545c7c0. Doing it direct also means creds are more correctly stored using the kSecClass for crypto keys rather than user passwords.

Thanks heaps for the pull request though, and let me know if you think there's any issues or shortcomings in the current implementation.

@followben followben closed this Oct 8, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants