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

Commit 69db585

Browse files
committed
Azure DevOps Rebranding
- [x] Change all text, strings, and other resources which refer to Visual Studio Team Services [VSTS] to refer to Azure DevOps instead. - [x] Change the VisualStudioTeamServices namespace and type names from Visual Studio Team Services / VSTS to Azure DevOps. - [x] Change the VisualStudioTeamServices named projects to AzureDevops. Update all solution and cross-project references to accomodate for the changes. - [x] Change the VisualStudioTeamServices named projects to AzureDevops. Update all solution and cross-project references to accomodate for the changes. - [x] Move all files from 'VisualStudioTeamServices' into 'AzureDevOps' folders. - [x] Update all solution and project references. - [x] Update test data to use the new "Devops" name. - [x] Since users won't be ready to update their branded configuration values, we need to retain support for the VSTS branded options; which emitting a warning for the deprecated option usage.
1 parent 7d49e3b commit 69db585

File tree

80 files changed

+623
-265
lines changed

Some content is hidden

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

80 files changed

+623
-265
lines changed
+4-4
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<PropertyGroup>
66
<ProjectGuid>{04151231-4FA4-49B2-AE6D-EBDBA36B1169}</ProjectGuid>
77
<AppDesignerFolder>Properties</AppDesignerFolder>
8-
<RootNamespace>VisualStudioTeamServices.Authentication.Test</RootNamespace>
9-
<AssemblyName>VisualStudioTeamServices.Authentication.Proxy</AssemblyName>
8+
<RootNamespace>AzureDevOps.Authentication.Test</RootNamespace>
9+
<AssemblyName>AzureDevOps.Authentication.Proxy</AssemblyName>
1010
<NuGetPackageImportStamp />
1111
</PropertyGroup>
1212
<Import Project="..\..\Proxy.props" />
@@ -19,9 +19,9 @@
1919
<Project>{19770407-b493-459d-bb4f-04fbefb1ba13}</Project>
2020
<Name>Microsoft.Alm.Authentication</Name>
2121
</ProjectReference>
22-
<ProjectReference Include="..\Src\VisualStudioTeamServices.Authentication.csproj">
22+
<ProjectReference Include="..\Src\AzureDevOps.Authentication.csproj">
2323
<Project>{19770407-d7d8-4a37-914c-f552ff4b90d4}</Project>
24-
<Name>VisualStudioTeamServices.Authentication</Name>
24+
<Name>AzureDevOps.Authentication</Name>
2525
</ProjectReference>
2626
</ItemGroup>
2727
<ItemGroup>

VisualStudioTeamServices.Authentication/Proxy/CaptureAdal.cs AzureDevOps.Authentication/Proxy/CaptureAdal.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
using Microsoft.Alm.Authentication;
3030
using Microsoft.Alm.Authentication.Test;
3131

32-
namespace VisualStudioTeamServices.Authentication.Test
32+
namespace AzureDevOps.Authentication.Test
3333
{
3434
public class CaptureAdal : IAdal, ICaptureService<CapturedAdalData>
3535
{

VisualStudioTeamServices.Authentication/Proxy/CapturedAdalData.cs AzureDevOps.Authentication/Proxy/CapturedAdalData.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
using Newtonsoft.Json;
2828
using Newtonsoft.Json.Linq;
2929

30-
namespace VisualStudioTeamServices.Authentication.Test
30+
namespace AzureDevOps.Authentication.Test
3131
{
3232
[System.Diagnostics.DebuggerDisplay("{DebuggerDisplay, nq}")]
3333
public struct CapturedAdalData

VisualStudioTeamServices.Authentication/Proxy/Properties/AssemblyInfo.cs AzureDevOps.Authentication/Proxy/Properties/AssemblyInfo.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
// General Information about an assembly is controlled through the following
66
// set of attributes. Change these attribute values to modify the information
77
// associated with an assembly.
8-
[assembly: AssemblyTitle("VisualStudioTeamServices.Proxy")]
8+
[assembly: AssemblyTitle("AzureDevOps.Authentication.Proxy")]
99
[assembly: AssemblyDescription("")]
1010
[assembly: AssemblyConfiguration("")]
1111
[assembly: AssemblyCompany("")]
12-
[assembly: AssemblyProduct("VisualStudioTeamServices.Proxy")]
13-
[assembly: AssemblyCopyright("Copyright © 2018")]
12+
[assembly: AssemblyProduct("AzureDevOps.Authentication.Proxy")]
13+
[assembly: AssemblyCopyright("Copyright © Microsoft 2018")]
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
1616

VisualStudioTeamServices.Authentication/Proxy/ReplayAdal.cs AzureDevOps.Authentication/Proxy/ReplayAdal.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
using Microsoft.Alm.Authentication.Test;
3131
using static System.StringComparer;
3232

33-
namespace VisualStudioTeamServices.Authentication.Test
33+
namespace AzureDevOps.Authentication.Test
3434
{
3535
public class ReplayAdal : IAdal, IReplayService<CapturedAdalData>
3636
{

VisualStudioTeamServices.Authentication/Proxy/UnitTestBase.cs AzureDevOps.Authentication/Proxy/UnitTestBase.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
using System.Runtime.CompilerServices;
2727
using Microsoft.Alm.Authentication.Test;
2828

29-
namespace VisualStudioTeamServices.Authentication.Test
29+
namespace AzureDevOps.Authentication.Test
3030
{
3131
public class UnitTestBase : Microsoft.Alm.Authentication.Test.UnitTestBase
3232
{

VisualStudioTeamServices.Authentication/Src/AadAuthentication.cs AzureDevOps.Authentication/Src/AadAuthentication.cs

+18-18
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
using System.Threading.Tasks;
2828
using Microsoft.Alm.Authentication;
2929

30-
namespace VisualStudioTeamServices.Authentication
30+
namespace AzureDevOps.Authentication
3131
{
3232
/// <summary>
3333
/// Facilitates Azure Directory authentication.
@@ -54,12 +54,12 @@ public AadAuthentication(
5454
{
5555
if (tenantId == Guid.Empty)
5656
{
57-
Authority = new Authority(context, VisualStudioTeamServices.Authentication.Authority.DefaultAuthorityHostUrl);
57+
Authority = new Authority(context, AzureDevOps.Authentication.Authority.DefaultAuthorityHostUrl);
5858
}
5959
else
6060
{
6161
// Create an authority host URL in the format of https://login.microsoft.com/12345678-9ABC-DEF0-1234-56789ABCDEF0.
62-
string authorityHost = VisualStudioTeamServices.Authentication.Authority.GetAuthorityUrl(tenantId);
62+
string authorityHost = AzureDevOps.Authentication.Authority.GetAuthorityUrl(tenantId);
6363
Authority = new Authority(context, authorityHost);
6464
}
6565
}
@@ -70,22 +70,22 @@ public AadAuthentication(
7070
internal AadAuthentication(
7171
RuntimeContext context,
7272
ICredentialStore personalAccessTokenStore,
73-
ITokenStore vstsIdeTokenCache,
74-
IAuthority vstsAuthority)
73+
ITokenStore vsIdeTokenCache,
74+
IAuthority devopsAuthority)
7575
: base(context,
7676
personalAccessTokenStore,
77-
vstsIdeTokenCache,
78-
vstsAuthority)
77+
vsIdeTokenCache,
78+
devopsAuthority)
7979
{ }
8080

8181
/// <summary>
82-
/// Creates an interactive logon session, using ADAL secure browser GUI, which enables users to authenticate with the Azure tenant and acquire the necessary access tokens to exchange for a VSTS personal access token.
82+
/// Creates an interactive logon session, using ADAL secure browser GUI, which enables users to authenticate with the Azure tenant and acquire the necessary access tokens to exchange for an Azure DevOps Services personal access token.
8383
/// <para/>
8484
/// Tokens acquired are stored in the secure secret stores provided during initialization.
8585
/// <para/>
8686
/// Return a `<see cref="Credential"/>` for resource access if successful; otherwise `<see langword="null"/>`.
8787
/// </summary>
88-
/// <param name="targetUri">The URI of the VSTS resource.</param>
88+
/// <param name="targetUri">The URI of the Azure DevOps resource.</param>
8989
public async Task<Credential> InteractiveLogon(TargetUri targetUri, PersonalAccessTokenOptions options)
9090
{
9191
BaseSecureStore.ValidateTargetUri(targetUri);
@@ -110,13 +110,13 @@ public async Task<Credential> InteractiveLogon(TargetUri targetUri, PersonalAcce
110110
}
111111

112112
/// <summary>
113-
/// Creates an interactive logon session, using ADAL secure browser GUI, which enables users to authenticate with the Azure tenant and acquire the necessary access tokens to exchange for a VSTS personal access token.
113+
/// Creates an interactive logon session, using ADAL secure browser GUI, which enables users to authenticate with the Azure tenant and acquire the necessary access tokens to exchange for an Azure DevOps personal access token.
114114
/// <para/>
115115
/// Tokens acquired are stored in the secure secret stores provided during initialization.
116116
/// <para/>
117117
/// Return a `<see cref="Credential"/>` for resource access if successful; otherwise `<see langword="null"/>`.
118118
/// </summary>
119-
/// <param name="targetUri">The URI of the VSTS resource.</param>
119+
/// <param name="targetUri">The URI of the Azure DevOps resource.</param>
120120
/// <param name="requestCompactToken">
121121
/// Requests a compact format personal access token if `<see langword="true"/>`; otherwise requests a standard format personal access token.
122122
/// <para/>
@@ -147,14 +147,14 @@ public async Task<Credential> InteractiveLogon(TargetUri targetUri, bool request
147147
}
148148

149149
/// <summary>
150-
/// Uses Active Directory Federation Services to authenticate with the Azure tenant non-interactively and acquire the necessary access tokens to exchange for a VSTS personal access token.
150+
/// Uses Active Directory Federation Services to authenticate with the Azure tenant non-interactively and acquire the necessary access tokens to exchange for an Azure DevOps personal access token.
151151
/// <para/>
152152
/// Tokens acquired are stored in the secure secret stores provided during initialization.
153153
/// <para/>
154154
/// Return a `<see cref="Credential"/>` for resource access if successful; otherwise `<see langword="null"/>`.
155155
/// </summary>
156-
/// <param name="targetUri">The URL of the VSTS resource.</param>
157-
/// <param name="options">Options related to VSTS personal access creation.</param>
156+
/// <param name="targetUri">The URL of the Azure DevOps resource.</param>
157+
/// <param name="options">Options related to Azure DevOps personal access creation.</param>
158158
public async Task<Credential> NoninteractiveLogon(TargetUri targetUri, PersonalAccessTokenOptions options)
159159
{
160160
BaseSecureStore.ValidateTargetUri(targetUri);
@@ -171,21 +171,21 @@ public async Task<Credential> NoninteractiveLogon(TargetUri targetUri, PersonalA
171171
}
172172
catch (AuthenticationException)
173173
{
174-
Trace.WriteLine($"failed to acquire for '{targetUri}' token from VstsAuthority.");
174+
Trace.WriteLine($"failed to acquire for '{targetUri}' token from Azure DevOps Authority.");
175175
}
176176

177177
Trace.WriteLine($"non-interactive logon for '{targetUri}' failed");
178178
return null;
179179
}
180180

181181
/// <summary>
182-
/// Uses Active Directory Federation Services to authenticate with the Azure tenant non-interactively and acquire the necessary access tokens to exchange for a VSTS personal access token.
182+
/// Uses Active Directory Federation Services to authenticate with the Azure tenant non-interactively and acquire the necessary access tokens to exchange for an Azure DevOps Services personal access token.
183183
/// <para/>
184184
/// Tokens acquired are stored in the secure secret stores provided during initialization.
185185
/// <para/>
186186
/// Return a `<see cref="Credential"/>` for resource access if successful; otherwise `<see langword="null"/>`.
187187
/// </summary>
188-
/// <param name="targetUri">The URL of the VSTS resource.</param>
188+
/// <param name="targetUri">The URL of the Azure DevOps resource.</param>
189189
/// <param name="requestCompactToken">
190190
/// Requests a compact format personal access token if `<see langword="true"/>`; otherwise requests a standard format personal access token.
191191
/// <para/>
@@ -208,7 +208,7 @@ public async Task<Credential> NoninteractiveLogon(TargetUri targetUri, bool requ
208208
}
209209
catch (AuthenticationException)
210210
{
211-
Trace.WriteLine($"failed to acquire for '{targetUri}' token from VstsAuthority.");
211+
Trace.WriteLine($"failed to acquire for '{targetUri}' token from Azure DevOps Authority.");
212212
}
213213

214214
Trace.WriteLine($"non-interactive logon for '{targetUri}' failed");

VisualStudioTeamServices.Authentication/Src/Adal.cs AzureDevOps.Authentication/Src/Adal.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
using AdalExtentions = Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContextIntegratedAuthExtensions;
3030
using Alm = Microsoft.Alm.Authentication;
3131

32-
namespace VisualStudioTeamServices.Authentication
32+
namespace AzureDevOps.Authentication
3333
{
3434
public interface IAdal : Alm.IRuntimeService
3535
{

VisualStudioTeamServices.Authentication/Src/AdalTokenCache.cs AzureDevOps.Authentication/Src/AdalTokenCache.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
using Microsoft.Alm.Authentication;
3131
using ActiveDirectory = Microsoft.IdentityModel.Clients.ActiveDirectory;
3232

33-
namespace VisualStudioTeamServices.Authentication
33+
namespace AzureDevOps.Authentication
3434
{
3535
internal class AdalTokenCache : ActiveDirectory.TokenCache
3636
{

VisualStudioTeamServices.Authentication/Src/Authentication.cs AzureDevOps.Authentication/Src/Authentication.cs

+15-15
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@
3333
using Microsoft.Alm.Authentication;
3434

3535
using static System.StringComparer;
36-
using static VisualStudioTeamServices.Authentication.Authority;
36+
using static AzureDevOps.Authentication.Authority;
3737

38-
namespace VisualStudioTeamServices.Authentication
38+
namespace AzureDevOps.Authentication
3939
{
4040
/// <summary>
41-
/// Base functionality for performing authentication operations against Visual Studio Online.
41+
/// Base functionality for performing authentication operations against Azure DevOps.
4242
/// </summary>
4343
public abstract class Authentication : BaseAuthentication
4444
{
@@ -48,8 +48,8 @@ public abstract class Authentication : BaseAuthentication
4848

4949
protected const string AdalRefreshPrefix = "ada";
5050

51-
internal const string AzureBaseUrlHost = VisualStudioTeamServices.Authentication.Authority.AzureBaseUrlHost;
52-
internal const string VstsBaseUrlHost = VisualStudioTeamServices.Authentication.Authority.VstsBaseUrlHost;
51+
internal const string AzureBaseUrlHost = AzureDevOps.Authentication.Authority.AzureBaseUrlHost;
52+
internal const string VstsBaseUrlHost = AzureDevOps.Authentication.Authority.VstsBaseUrlHost;
5353

5454
private const char CachePairSeperator = '=';
5555
private const char CachePairTerminator = '\0';
@@ -161,7 +161,7 @@ public override async Task<bool> DeleteCredentials(TargetUri targetUri)
161161
/// <summary>
162162
/// Detects the backing authority of the end-point.
163163
/// <para/>
164-
/// Returns `<see langword="true"/>` if the authority is Visual Studio Online, along with the tenant identity; `<see langword="false"/>` otherwise.
164+
/// Returns `<see langword="true"/>` if the authority is Azure DevOps, along with the tenant identity; `<see langword="false"/>` otherwise.
165165
/// </summary>
166166
/// <param name="targetUri">The resource which the authority protects.</param>
167167
/// <param name="tenantId">The identity of the authority tenant; `<see cref="Guid.Empty"/>` otherwise.</param>
@@ -170,14 +170,14 @@ public override async Task<bool> DeleteCredentials(TargetUri targetUri)
170170
public static async Task<Guid?> DetectAuthority(RuntimeContext context, TargetUri targetUri)
171171
{
172172
const int GuidStringLength = 36;
173-
const string VstsResourceTenantHeader = "X-VSS-ResourceTenant";
173+
const string XvssResourceTenantHeader = "X-VSS-ResourceTenant";
174174

175175
if (context is null)
176176
throw new ArgumentNullException(nameof(context));
177177
if (targetUri is null)
178178
throw new ArgumentNullException(nameof(targetUri));
179179

180-
// Assume VSTS using Azure "common tenant" (empty GUID).
180+
// Assume Azure DevOps using Azure "common tenant" (empty GUID).
181181
var tenantId = Guid.Empty;
182182

183183
// Compose the request Uri, by default it is the target Uri.
@@ -202,7 +202,7 @@ public override async Task<bool> DeleteCredentials(TargetUri targetUri)
202202
// Check the cache for an existing value.
203203
if (cache.TryGetValue(requestUrl, out tenantId))
204204
{
205-
context.Trace.WriteLine($"'{requestUrl}' is VSTS, tenant resource is {{{tenantId.ToString("N")}}}.");
205+
context.Trace.WriteLine($"'{requestUrl}' is Azure DevOps, tenant resource is {{{tenantId.ToString("N")}}}.");
206206

207207
return tenantId;
208208
}
@@ -215,15 +215,15 @@ public override async Task<bool> DeleteCredentials(TargetUri targetUri)
215215

216216
try
217217
{
218-
// Query the host use the response headers to determine if the host is VSTS or not.
218+
// Query the host use the response headers to determine if the host is Azure DevOps or not.
219219
using (var response = await context.Network.HttpHeadAsync(requestUri, options))
220220
{
221221
if (response.Headers != null)
222222
{
223-
// If the "X-VSS-ResourceTenant" was returned, then it is VSTS and we'll need it's value.
224-
if (response.Headers.TryGetValues(VstsResourceTenantHeader, out IEnumerable<string> values))
223+
// If the "X-VSS-ResourceTenant" was returned, then it is Azure DevOps and we'll need it's value.
224+
if (response.Headers.TryGetValues(XvssResourceTenantHeader, out IEnumerable<string> values))
225225
{
226-
context.Trace.WriteLine($"detected '{requestUrl}' as VSTS from GET response.");
226+
context.Trace.WriteLine($"detected '{requestUrl}' as Azure DevOps from GET response.");
227227

228228
// The "Www-Authenticate" is a more reliable header, because it indicates the
229229
// authentication scheme that should be used to access the requested entity.
@@ -293,7 +293,7 @@ public override async Task<bool> DeleteCredentials(TargetUri targetUri)
293293

294294
context.Trace.WriteLine($"tenant resource for '{requestUrl}' is {{{tenantId.ToString("N")}}}.");
295295

296-
// Return the tenant identity to the caller because this is VSTS.
296+
// Return the tenant identity to the caller because this is Azure DevOps.
297297
return tenantId;
298298
}
299299
}
@@ -521,7 +521,7 @@ internal static string GetSecretKey(TargetUri targetUri, string prefix)
521521

522522
// When the full path is specified, there's no reason to assume the path; otherwise attempt to
523523
// detect the actual target path information.
524-
string targetUrl = (IsVstsUrl(targetUri) && !targetUri.HasPath)
524+
string targetUrl = (IsAzureDevOpsUrl(targetUri) && !targetUri.HasPath)
525525
? GetTargetUrl(targetUri, true)
526526
: targetUri.ToString(true, true, true);
527527

VisualStudioTeamServices.Authentication/Src/AuthenticationException.cs AzureDevOps.Authentication/Src/AuthenticationException.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
using System;
2727
using System.Runtime.Serialization;
2828

29-
namespace VisualStudioTeamServices.Authentication
29+
namespace AzureDevOps.Authentication
3030
{
3131
[Serializable]
3232
public class AuthenticationException : Exception

VisualStudioTeamServices.Authentication/Src/Authority.cs AzureDevOps.Authentication/Src/Authority.cs

+7-7
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
using static System.StringComparer;
3535
using Culture = System.Globalization.CultureInfo;
3636

37-
namespace VisualStudioTeamServices.Authentication
37+
namespace AzureDevOps.Authentication
3838
{
3939
/// <summary>
4040
/// Interfaces with Azure to perform authentication and identity services.
@@ -57,7 +57,7 @@ internal class Authority : Base, IAuthority
5757
public const string DefaultAuthorityHostUrl = AuthorityHostUrlBase + "/common";
5858

5959
/// <summary>
60-
/// The root domain of VSTS hosted repositories.
60+
/// The root domain of Azure DevOps hosted repositories.
6161
/// </summary>
6262
public const string VstsBaseUrlHost = "visualstudio.com";
6363

@@ -259,7 +259,7 @@ public async Task<bool> PopulateTokenTargetId(TargetUri targetUri, Token authori
259259

260260
try
261261
{
262-
// Create an request to the VSTS deployment data end-point.
262+
// Create an request to the Azure DevOps deployment data end-point.
263263
var requestUri = GetConnectionDataUri(targetUri);
264264
var options = new NetworkRequestOptions(true)
265265
{
@@ -325,14 +325,14 @@ public async Task<bool> ValidateToken(TargetUri targetUri, Token token)
325325

326326
internal static TargetUri GetConnectionDataUri(TargetUri targetUri)
327327
{
328-
const string VstsValidationUrlPath = "_apis/connectiondata";
328+
const string AzureDevOpsValidationUrlPath = "_apis/connectiondata";
329329

330330
if (targetUri is null)
331331
throw new ArgumentNullException(nameof(targetUri));
332332

333333
// Create a URL to the connection data end-point, it's deployment level and "always on".
334334
string requestUrl = GetTargetUrl(targetUri, false);
335-
string validationUrl = requestUrl + VstsValidationUrlPath;
335+
string validationUrl = requestUrl + AzureDevOpsValidationUrlPath;
336336

337337
return targetUri.CreateWith(validationUrl);
338338
}
@@ -417,7 +417,7 @@ internal static string GetTargetUrl(TargetUri targetUri, bool keepUsername)
417417
return requestUrl;
418418
}
419419

420-
internal static bool IsVstsUrl(TargetUri targetUri)
420+
internal static bool IsAzureDevOpsUrl(TargetUri targetUri)
421421
{
422422
return (OrdinalIgnoreCase.Equals(targetUri.Scheme, Uri.UriSchemeHttp)
423423
|| OrdinalIgnoreCase.Equals(targetUri.Scheme, Uri.UriSchemeHttps))
@@ -435,7 +435,7 @@ internal async Task<bool> ValidateSecret(TargetUri targetUri, Secret secret)
435435
if (secret is null)
436436
return false;
437437

438-
// Create an request to the VSTS deployment data end-point.
438+
// Create an request to the Azure DevOps deployment data end-point.
439439
var requestUri = GetConnectionDataUri(targetUri);
440440
var options = new NetworkRequestOptions(true)
441441
{

0 commit comments

Comments
 (0)