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

Decouple Credentials Manager storage from SimpleKeychain [SDK-2936] #551

Merged
merged 6 commits into from
Nov 19, 2021

Conversation

adamjmcgrath
Copy link
Contributor

Changes

Create a protocol that contains the storage methods used by the Credentials Manager and add an extension to A0SimpleKeychain to have it implement that protocol. Then ensure the storage parameter has that protocol as its type instead of A0SimpleKeychain.

Wasn't sure where to put the protocol and extension...

Testing

Please describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.

  • This change adds unit test coverage
  • This change has been tested on the latest version of the platform/language or why not

Checklist

@adamjmcgrath adamjmcgrath added the review:small Small review label Nov 18, 2021
@adamjmcgrath adamjmcgrath requested a review from a team as a code owner November 18, 2021 15:27
V2_MIGRATION_GUIDE.md Outdated Show resolved Hide resolved
Copy link
Contributor

@Widcket Widcket left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The protocol methods need some changes to make sure they follow the API Guidelines.

adamjmcgrath and others added 2 commits November 19, 2021 08:42
Co-authored-by: Rita Zerrizuela <zeta@widcket.com>
Copy link
Contributor

@Widcket Widcket left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -5,10 +5,42 @@ import JWTDecode
import LocalAuthentication
#endif

/// Generic storage API for storing credentials
public protocol CredentialsStorage {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's fine for it to be on the same file as the Credentials Manager

@Widcket Widcket merged commit 068671d into beta Nov 19, 2021
@Widcket Widcket deleted the simple-keychain-proto branch November 19, 2021 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review:small Small review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants