okta / okta-storage-swift

Secure storage library
https://github.com/okta/okta-storage-swift
Other
8 stars 8 forks source link

Secure storage manager - initial commit #1

Closed IldarAbdullin-okta closed 5 years ago

IldarAbdullin-okta commented 5 years ago

Current API just mimics interfaces and ideas from Okta private repo - ios-utils

Developer has to create storage manager instance of particular type via factory method. Then use lightweight object for working with keychain

Example: let storageManager = OktaSecureStorageManager.secureStorageManager(type: .plainText, accountId: "jdoe", groupId: "com.mycompany.sharedkeychain") storageManager.save(data: "Token Data") let token = storageManager.storedData()

In oder to further simplify API potential improvement would be to have just one class that joins all the functionality. We even don't need to create instance of the class Code example could be: OktaSecureStorageManager.save(data: "Token Data", accountId: "jdoe", groupId: "com.mycompany.sharedkeychain") let token = OktaSecureStorageManager.storedData()

IldarAbdullin-okta commented 5 years ago

@jmelberg-okta , @hansreichenbach-okta , thank you for your comments!

So short action plan could be the following: