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

Commit 80880fc

Browse files
author
J Wyman
committed
Merge pull request #117 from whoisj/rename-vsts
Rename 'VSO' to 'VSTS' and fix copyrights.
2 parents 5dc87d1 + 156817d commit 80880fc

27 files changed

+347
-347
lines changed

Cli-CredentialHelper.Test/Cli-CredentialHelper.Test.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<ProjectGuid>{FF70EB69-AE6D-4DCC-BA9F-12CB0C6581AE}</ProjectGuid>
77
<OutputType>Library</OutputType>
88
<AppDesignerFolder>Properties</AppDesignerFolder>
9-
<RootNamespace>Microsoft.TeamFoundation.CredentialHelper.Test</RootNamespace>
10-
<AssemblyName>Microsoft.TeamFoundation.CredentialHelper.Test</AssemblyName>
9+
<RootNamespace>Microsoft.Alm.CredentialHelper.Test</RootNamespace>
10+
<AssemblyName>Microsoft.Alm.CredentialHelper.Test</AssemblyName>
1111
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
1212
<FileAlignment>512</FileAlignment>
1313
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

Cli-CredentialHelper.Test/Properties/AssemblyInfo.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[assembly: AssemblyConfiguration("")]
1111
[assembly: AssemblyCompany("Microsoft Corporation")]
1212
[assembly: AssemblyProduct("https://github.com/Microsoft/Git-Credential-Manager-for-Windows")]
13-
[assembly: AssemblyCopyright("Copyright © Microsoft 2015")]
13+
[assembly: AssemblyCopyright("Copyright © Microsoft 2016")]
1414
[assembly: AssemblyTrademark("Microsoft Corporation")]
1515
[assembly: AssemblyCulture("")]
1616

Cli-CredentialHelper/Program.cs

+14-14
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class Program
3939

4040
private const string ConfigPrefix = "credential";
4141
private const string SecretsNamespace = "git";
42-
private static readonly VsoTokenScope VsoCredentialScope = VsoTokenScope.CodeWrite | VsoTokenScope.PackagingRead;
42+
private static readonly VstsTokenScope VstsCredentialScope = VstsTokenScope.CodeWrite | VstsTokenScope.PackagingRead;
4343
private static readonly GithubTokenScope GithubCredentialScope = GithubTokenScope.Gist | GithubTokenScope.PublicKeyRead | GithubTokenScope.Repo;
4444
private static readonly List<string> CommandList = new List<string>
4545
{
@@ -298,9 +298,9 @@ private static void Erase()
298298

299299
case AuthorityType.AzureDirectory:
300300
case AuthorityType.MicrosoftAccount:
301-
Trace.WriteLine(" deleting VSO credentials");
302-
BaseVsoAuthentication vsoAuth = authentication as BaseVsoAuthentication;
303-
vsoAuth.DeleteCredentials(operationArguments.TargetUri);
301+
Trace.WriteLine(" deleting VSTS credentials");
302+
BaseVstsAuthentication vstsAuth = authentication as BaseVstsAuthentication;
303+
vstsAuth.DeleteCredentials(operationArguments.TargetUri);
304304
break;
305305

306306
case AuthorityType.GitHub:
@@ -358,7 +358,7 @@ private static void Get()
358358
break;
359359

360360
case AuthorityType.AzureDirectory:
361-
VsoAadAuthentication aadAuth = authentication as VsoAadAuthentication;
361+
VstsAadAuthentication aadAuth = authentication as VstsAadAuthentication;
362362

363363
Task.Run(async () =>
364364
{
@@ -397,7 +397,7 @@ private static void Get()
397397
break;
398398

399399
case AuthorityType.MicrosoftAccount:
400-
VsoMsaAuthentication msaAuth = authentication as VsoMsaAuthentication;
400+
VstsMsaAuthentication msaAuth = authentication as VstsMsaAuthentication;
401401

402402
Task.Run(async () =>
403403
{
@@ -536,8 +536,8 @@ private static BaseAuthentication CreateAuthentication(OperationArguments operat
536536
Trace.WriteLine(" detecting authority type");
537537

538538
// detect the authority
539-
if (BaseVsoAuthentication.GetAuthentication(operationArguments.TargetUri,
540-
VsoCredentialScope,
539+
if (BaseVstsAuthentication.GetAuthentication(operationArguments.TargetUri,
540+
VstsCredentialScope,
541541
secrets,
542542
null,
543543
out authority)
@@ -554,12 +554,12 @@ private static BaseAuthentication CreateAuthentication(OperationArguments operat
554554
out authority))
555555
{
556556
// set the authority type based on the returned value
557-
if (authority is VsoMsaAuthentication)
557+
if (authority is VstsMsaAuthentication)
558558
{
559559
operationArguments.Authority = AuthorityType.MicrosoftAccount;
560560
goto case AuthorityType.MicrosoftAccount;
561561
}
562-
else if (authority is VsoAadAuthentication)
562+
else if (authority is VstsAadAuthentication)
563563
{
564564
operationArguments.Authority = AuthorityType.AzureDirectory;
565565
goto case AuthorityType.AzureDirectory;
@@ -578,8 +578,8 @@ private static BaseAuthentication CreateAuthentication(OperationArguments operat
578578
Trace.WriteLine(" authority is Azure Directory");
579579

580580
Guid tenantId = Guid.Empty;
581-
// return the allocated authority or a generic AAD backed VSO authentication object
582-
return authority ?? new VsoAadAuthentication(Guid.Empty, VsoCredentialScope, secrets);
581+
// return the allocated authority or a generic AAD backed VSTS authentication object
582+
return authority ?? new VstsAadAuthentication(Guid.Empty, VstsCredentialScope, secrets);
583583

584584
case AuthorityType.Basic:
585585
default:
@@ -605,8 +605,8 @@ private static BaseAuthentication CreateAuthentication(OperationArguments operat
605605
case AuthorityType.MicrosoftAccount:
606606
Trace.WriteLine(" authority is Microsoft Live");
607607

608-
// return the allocated authority or a generic MSA backed VSO authentication object
609-
return authority ?? new VsoMsaAuthentication(VsoCredentialScope, secrets);
608+
// return the allocated authority or a generic MSA backed VSTS authentication object
609+
return authority ?? new VstsMsaAuthentication(VstsCredentialScope, secrets);
610610
}
611611
}
612612

Cli-CredentialHelper/Properties/AssemblyInfo.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
[assembly: AssemblyConfiguration("")]
99
[assembly: AssemblyCompany("Microsoft Corporation")]
1010
[assembly: AssemblyProduct(Microsoft.Alm.CredentialHelper.Program.Title + " command line interface")]
11-
[assembly: AssemblyCopyright("Copyright © Microsoft 2015")]
11+
[assembly: AssemblyCopyright("Copyright © Microsoft 2016")]
1212
[assembly: AssemblyTrademark("Microsoft Corporation")]
1313
[assembly: AssemblyCulture("")]
1414

1515
[assembly: Guid("62f52119-63d4-40a8-a9df-f1c4b473308a")]
16-
[assembly: AssemblyVersion("1.0.0.0")]
17-
[assembly: AssemblyFileVersion("1.0.0.0")]
16+
[assembly: AssemblyVersion("1.1.0.0")]
17+
[assembly: AssemblyFileVersion("1.1.0.0")]
1818
[assembly: NeutralResourcesLanguage("en-US")]
19-
[assembly: InternalsVisibleTo("Microsoft.TeamFoundation.CredentialHelper.Test")]
19+
[assembly: InternalsVisibleTo("Microsoft.Alm.CredentialHelper.Test")]

Microsoft.Alm.Authentication.Test/AuthenticationTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class AuthenticationTests
1111
public static readonly Credential DefaultPersonalAccessToken = new Credential("personal-access-token", "personal-access-token");
1212
public static readonly Uri DefaultTargetUri = new Uri("https://unit-test.uri/git-credential");
1313
public static readonly Uri InvalidTargetUri = new Uri("https://invlaid-test.uri/git-credential");
14-
public static readonly VsoTokenScope DefaultTokenScope = VsoTokenScope.CodeWrite;
14+
public static readonly VstsTokenScope DefaultTokenScope = VstsTokenScope.CodeWrite;
1515

1616
public AuthenticationTests()
1717
{

Microsoft.Alm.Authentication.Test/AuthorityFake.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace Microsoft.Alm.Authentication.Test
55
{
6-
internal class AuthorityFake : IVsoAuthority
6+
internal class AuthorityFake : IVstsAuthority
77
{
88
public TokenPair AcquireToken(Uri targetUri, string clientId, string resource, Uri redirectUri, string queryParameters = null)
99
{
@@ -20,7 +20,7 @@ public async Task<TokenPair> AcquireTokenByRefreshTokenAsync(Uri targetUri, stri
2020
return await Task.Run(() => { return new TokenPair("token-access", "token-refresh"); });
2121
}
2222

23-
public async Task<Token> GeneratePersonalAccessToken(Uri targetUri, Token accessToken, VsoTokenScope tokenScope, bool requireCompactToken)
23+
public async Task<Token> GeneratePersonalAccessToken(Uri targetUri, Token accessToken, VstsTokenScope tokenScope, bool requireCompactToken)
2424
{
2525
return await Task.Run(() => { return new Token("personal-access-token", TokenType.Personal); });
2626
}

Microsoft.Alm.Authentication.Test/Microsoft.Alm.Authentication.Test.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@
7272
<Compile Include="GithubTokenScopeTests.cs" />
7373
<Compile Include="Properties\AssemblyInfo.cs" />
7474
<Compile Include="TokenTests.cs" />
75-
<Compile Include="VsoAadTests.cs" />
76-
<Compile Include="VsoMsaTests.cs" />
77-
<Compile Include="VsoTokenScopeTests.cs" />
75+
<Compile Include="VstsAadTests.cs" />
76+
<Compile Include="VstsMsaTests.cs" />
77+
<Compile Include="VstsTokenScopeTests.cs" />
7878
</ItemGroup>
7979
<ItemGroup>
8080
<ProjectReference Include="..\Microsoft.Alm.Authentication\Microsoft.Alm.Authentication.csproj">

Microsoft.Alm.Authentication.Test/Properties/AssemblyInfo.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[assembly: AssemblyConfiguration("")]
1111
[assembly: AssemblyCompany("Microsoft Corporation")]
1212
[assembly: AssemblyProduct("https://github.com/Microsoft/Git-Credential-Manager-for-Windows")]
13-
[assembly: AssemblyCopyright("Copyright © Microsoft Corporation 2015")]
13+
[assembly: AssemblyCopyright("Copyright © Microsoft Corporation 2016")]
1414
[assembly: AssemblyTrademark("Microsoft")]
1515
[assembly: AssemblyCulture("")]
1616

Microsoft.Alm.Authentication.Test/VsoTokenScopeTests.cs

-126
This file was deleted.

0 commit comments

Comments
 (0)