8000 Remove duplicate credential classes. by grokys · Pull Request #1200 · github/VisualStudio · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Remove duplicate credential classes. #1200

Merged
merged 10 commits into from
Nov 9, 2017

Conversation

grokys
Copy link
Contributor
@grokys grokys commented Aug 25, 2017

Previously credentials were read by 4 separate interfaces/classes:

  • GitHub.Api.ILoginCache/IWindowsLoginCache
  • GitHub.Api.ILoginCache/GitHub.Caches.LoginCache
  • SimpleCredentialStore
  • CredentialCache

This PR consolidates all of these separate classes into IKeychain/WindowsKeychain.

Fixes #1176

grokys added 4 commits August 25, 2017 13:29
Previously credentials were read by 4 separate interfaces/classes:

- `IKeychain`/`WindowsKeychain`
- `ILoginCache`/`LoginCache`
- `SimpleCredentialStore`
- `CredentialCache`

Make everything go via `IKeychain`.
@grokys grokys force-pushed the fixes/1176-duplicate-login-classes branch from b357025 to 7e061d1 Compare August 25, 2017 14:10
return new SecureUsernamePasswordCredentials
try
{
var credentials = ThreadHelper.JoinableTaskFactory.Run(async () => await keychain.Load(host));
Copy link
Contributor Author
@grokys grokys Aug 25, 2017

Choose a reason for hiding this comment

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

Previously we were doing a .Wait on an observable here, which is Bad. I've changed it to use the pattern described in the 3 Threading Rules of VS.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh yeah, nice catch, we should beat whoever wrote that with a large 🐟

Copy link
Contributor

Choose a reason for hiding this comment

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

whistles

@grokys grokys changed the title WIP: Remove duplicate credential classes. Remove duplicate credential classes. Aug 25, 2017
@grokys grokys requested a review from shana August 25, 2017 14:23
grokys added 2 commits August 25, 2017 16:54
Just call `ToObservable` on the task returned by `IKeychain`.
 Conflicts:
	src/GitHub.App/Models/RepositoryHost.cs
	src/UnitTests/GitHub.App/Models/RepositoryHostTests.cs
@grokys grokys mentioned this pull request Aug 30, 2017
@shana shana closed this Oct 23, 2017
@shana shana merged commit e6c5d89 into refactor/connections-master Nov 9, 2017
@shana shana changed the base branch from master to refactor/connections-master November 9, 2017 00:46
@shana shana deleted the fixes/1176-duplicate-login-classes branch November 9, 2017 00:46
@grokys grokys mentioned this pull request Nov 29, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0