Skip to content

Commit d8cc644

Browse files
committed
github-ui: use new GitHub UI on Windows
Use a refreshed WPF-based UI on Windows for GitHub authentication. Supports selecting OAuth/browser authentication and also displays the URL of a GitHub Enterprise instance if authentication to one.
1 parent d5975df commit d8cc644

File tree

103 files changed

+2655
-3587
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+2655
-3587
lines changed

Git-Credential-Manager.sln

Lines changed: 84 additions & 91 deletions
Large diffs are not rendered by default.

NOTICE

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
NOTICES AND INFORMATION
2+
Do Not Translate or Localize
3+
4+
This repository for Git Credential Manager Core includes material from the
5+
projects listed below.
6+
7+
1. GitHub/VisualStudio (https://github.com/github/VisualStudio)
8+
9+
Copyright (c) GitHub Inc.
10+
11+
Permission is hereby granted, free of charge, to any person obtaining a copy of
12+
this software and associated documentation files (the "Software"), to deal in
13+
the Software without restriction, including without limitation the rights to
14+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
15+
the Software, and to permit persons to whom the Software is furnished to do so,
16+
subject to the following conditions:
17+
18+
The above copyright notice and this permission notice shall be included in all
19+
copies or substantial portions of the Software.
20+
21+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
23+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
24+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
25+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
26+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

src/shared/Git-Credential-Manager/Git-Credential-Manager.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
66
<TargetFrameworks Condition="'$(OSPlatform)'=='windows'">net461;netcoreapp2.1</TargetFrameworks>
77
<RuntimeIdentifiers>win-x64;osx-x64</RuntimeIdentifiers>
8+
<PlatformTarget>x64</PlatformTarget>
89
<AssemblyName>git-credential-manager-core</AssemblyName>
910
<RootNamespace>Microsoft.Git.CredentialManager</RootNamespace>
1011
<ApplicationIcon>$(RepoAssetsPath)gcmicon.ico</ApplicationIcon>
@@ -19,4 +20,8 @@
1920
<ProjectReference Include="..\Microsoft.Git.CredentialManager\Microsoft.Git.CredentialManager.csproj" />
2021
</ItemGroup>
2122

23+
<ItemGroup>
24+
<Content Include="NOTICE" CopyToOutputDirectory="PreserveNewest" />
25+
</ItemGroup>
26+
2227
</Project>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
NOTICES AND INFORMATION
2+
Do Not Translate or Localize
3+
4+
This software incorporates material from third parties. Microsoft makes certain
5+
open source code available at https://3rdpartysource.microsoft.com, or you may
6+
send a check or money order for US $5.00, including the product name, the open
7+
source component name, and version number, to:
8+
9+
Source Code Compliance Team
10+
Microsoft Corporation
11+
One Microsoft Way
12+
Redmond, WA 98052
13+
USA
14+
15+
Notwithstanding any other terms, you may reverse engineer this software to the
16+
extent required to debug changes to any libraries licensed under the GNU Lesser
17+
General Public License.
18+
19+
1. GitHub/VisualStudio (https://github.com/github/VisualStudio)
20+
21+
Copyright (c) GitHub Inc.
22+
23+
Permission is hereby granted, free of charge, to any person obtaining a copy of
24+
this software and associated documentation files (the "Software"), to deal in
25+
the Software without restriction, including without limitation the rights to
26+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
27+
the Software, and to permit persons to whom the Software is furnished to do so,
28+
subject to the following conditions:
29+
30+
The above copyright notice and this permission notice shall be included in all
31+
copies or substantial portions of the Software.
32+
33+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
34+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
35+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
36+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
37+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
38+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

src/shared/GitHub/GitHubAuthentication.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ public async Task<AuthenticationPromptResult> GetAuthenticationAsync(Uri targetU
8282
var promptArgs = new StringBuilder("prompt");
8383
if ((modes & AuthenticationModes.Basic) != 0) promptArgs.Append(" --basic");
8484
if ((modes & AuthenticationModes.OAuth) != 0) promptArgs.Append(" --oauth");
85+
if (!GitHubHostProvider.IsGitHubDotCom(targetUri)) promptArgs.AppendFormat(" --enterprise-url {0}", targetUri.ToString());
8586

8687
IDictionary<string, string> resultDict = await InvokeHelperAsync(helperPath, promptArgs.ToString(), null);
8788

src/shared/GitHub/GitHubConstants.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public static class GitHubConstants
99
public const string GitHubBaseUrlHost = "github.com";
1010
public const string GistBaseUrlHost = "gist." + GitHubBaseUrlHost;
1111

12-
public const string AuthHelperName = "GitHub.Authentication.Helper";
12+
public const string AuthHelperName = "GitHub.UI";
1313

1414
/// <summary>
1515
/// The GitHub required HTTP accepts header value

src/windows/GitHub.Authentication.Helper.Windows/AppResources.xaml

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/windows/GitHub.Authentication.Helper.Windows/Assets/Styles.xaml

Lines changed: 0 additions & 207 deletions
This file was deleted.

0 commit comments

Comments
 (0)