diff --git a/VisualStudioTeamServices.Authentication/Proxy/VisualStudioTeamServices.Authentication.Proxy.csproj b/AzureDevOps.Authentication/Proxy/AzureDevOps.Authentication.Proxy.csproj similarity index 92% rename from VisualStudioTeamServices.Authentication/Proxy/VisualStudioTeamServices.Authentication.Proxy.csproj rename to AzureDevOps.Authentication/Proxy/AzureDevOps.Authentication.Proxy.csproj index 0aa4b209f..a5a137283 100644 --- a/VisualStudioTeamServices.Authentication/Proxy/VisualStudioTeamServices.Authentication.Proxy.csproj +++ b/AzureDevOps.Authentication/Proxy/AzureDevOps.Authentication.Proxy.csproj @@ -5,8 +5,8 @@ {04151231-4FA4-49B2-AE6D-EBDBA36B1169} Properties - VisualStudioTeamServices.Authentication.Test - VisualStudioTeamServices.Authentication.Proxy + AzureDevOps.Authentication.Test + AzureDevOps.Authentication.Proxy @@ -19,9 +19,9 @@ {19770407-b493-459d-bb4f-04fbefb1ba13} Microsoft.Alm.Authentication - + {19770407-d7d8-4a37-914c-f552ff4b90d4} - VisualStudioTeamServices.Authentication + AzureDevOps.Authentication diff --git a/VisualStudioTeamServices.Authentication/Proxy/CaptureAdal.cs b/AzureDevOps.Authentication/Proxy/CaptureAdal.cs similarity index 99% rename from VisualStudioTeamServices.Authentication/Proxy/CaptureAdal.cs rename to AzureDevOps.Authentication/Proxy/CaptureAdal.cs index 05df906f8..23279fbf9 100644 --- a/VisualStudioTeamServices.Authentication/Proxy/CaptureAdal.cs +++ b/AzureDevOps.Authentication/Proxy/CaptureAdal.cs @@ -29,7 +29,7 @@ using Microsoft.Alm.Authentication; using Microsoft.Alm.Authentication.Test; -namespace VisualStudioTeamServices.Authentication.Test +namespace AzureDevOps.Authentication.Test { public class CaptureAdal : IAdal, ICaptureService { diff --git a/VisualStudioTeamServices.Authentication/Proxy/CapturedAdalData.cs b/AzureDevOps.Authentication/Proxy/CapturedAdalData.cs similarity index 98% rename from VisualStudioTeamServices.Authentication/Proxy/CapturedAdalData.cs rename to AzureDevOps.Authentication/Proxy/CapturedAdalData.cs index 6266adc88..19dbfa0fd 100644 --- a/VisualStudioTeamServices.Authentication/Proxy/CapturedAdalData.cs +++ b/AzureDevOps.Authentication/Proxy/CapturedAdalData.cs @@ -27,7 +27,7 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; -namespace VisualStudioTeamServices.Authentication.Test +namespace AzureDevOps.Authentication.Test { [System.Diagnostics.DebuggerDisplay("{DebuggerDisplay, nq}")] public struct CapturedAdalData diff --git a/VisualStudioTeamServices.Authentication/Proxy/Properties/AssemblyInfo.cs b/AzureDevOps.Authentication/Proxy/Properties/AssemblyInfo.cs similarity index 87% rename from VisualStudioTeamServices.Authentication/Proxy/Properties/AssemblyInfo.cs rename to AzureDevOps.Authentication/Proxy/Properties/AssemblyInfo.cs index 5073e1fa3..911581ce5 100644 --- a/VisualStudioTeamServices.Authentication/Proxy/Properties/AssemblyInfo.cs +++ b/AzureDevOps.Authentication/Proxy/Properties/AssemblyInfo.cs @@ -5,12 +5,12 @@ // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("VisualStudioTeamServices.Proxy")] +[assembly: AssemblyTitle("AzureDevOps.Authentication.Proxy")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("VisualStudioTeamServices.Proxy")] -[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyProduct("AzureDevOps.Authentication.Proxy")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2018")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/VisualStudioTeamServices.Authentication/Proxy/ReplayAdal.cs b/AzureDevOps.Authentication/Proxy/ReplayAdal.cs similarity index 99% rename from VisualStudioTeamServices.Authentication/Proxy/ReplayAdal.cs rename to AzureDevOps.Authentication/Proxy/ReplayAdal.cs index 0380c3569..ba9f5601f 100644 --- a/VisualStudioTeamServices.Authentication/Proxy/ReplayAdal.cs +++ b/AzureDevOps.Authentication/Proxy/ReplayAdal.cs @@ -30,7 +30,7 @@ using Microsoft.Alm.Authentication.Test; using static System.StringComparer; -namespace VisualStudioTeamServices.Authentication.Test +namespace AzureDevOps.Authentication.Test { public class ReplayAdal : IAdal, IReplayService { diff --git a/VisualStudioTeamServices.Authentication/Proxy/UnitTestBase.cs b/AzureDevOps.Authentication/Proxy/UnitTestBase.cs similarity index 97% rename from VisualStudioTeamServices.Authentication/Proxy/UnitTestBase.cs rename to AzureDevOps.Authentication/Proxy/UnitTestBase.cs index e30abccf5..cdd5c64f6 100644 --- a/VisualStudioTeamServices.Authentication/Proxy/UnitTestBase.cs +++ b/AzureDevOps.Authentication/Proxy/UnitTestBase.cs @@ -26,7 +26,7 @@ using System.Runtime.CompilerServices; using Microsoft.Alm.Authentication.Test; -namespace VisualStudioTeamServices.Authentication.Test +namespace AzureDevOps.Authentication.Test { public class UnitTestBase : Microsoft.Alm.Authentication.Test.UnitTestBase { diff --git a/VisualStudioTeamServices.Authentication/Proxy/app.config b/AzureDevOps.Authentication/Proxy/app.config similarity index 100% rename from VisualStudioTeamServices.Authentication/Proxy/app.config rename to AzureDevOps.Authentication/Proxy/app.config diff --git a/VisualStudioTeamServices.Authentication/Proxy/packages.config b/AzureDevOps.Authentication/Proxy/packages.config similarity index 100% rename from VisualStudioTeamServices.Authentication/Proxy/packages.config rename to AzureDevOps.Authentication/Proxy/packages.config diff --git a/VisualStudioTeamServices.Authentication/Src/AadAuthentication.cs b/AzureDevOps.Authentication/Src/AadAuthentication.cs similarity index 89% rename from VisualStudioTeamServices.Authentication/Src/AadAuthentication.cs rename to AzureDevOps.Authentication/Src/AadAuthentication.cs index 4e9b86085..8bbfa9557 100644 --- a/VisualStudioTeamServices.Authentication/Src/AadAuthentication.cs +++ b/AzureDevOps.Authentication/Src/AadAuthentication.cs @@ -27,7 +27,7 @@ using System.Threading.Tasks; using Microsoft.Alm.Authentication; -namespace VisualStudioTeamServices.Authentication +namespace AzureDevOps.Authentication { /// /// Facilitates Azure Directory authentication. @@ -54,12 +54,12 @@ public sealed class AadAuthentication : Authentication, IAadAuthentication { if (tenantId == Guid.Empty) { - Authority = new Authority(context, VisualStudioTeamServices.Authentication.Authority.DefaultAuthorityHostUrl); + Authority = new Authority(context, AzureDevOps.Authentication.Authority.DefaultAuthorityHostUrl); } else { // Create an authority host URL in the format of https://login.microsoft.com/12345678-9ABC-DEF0-1234-56789ABCDEF0. - string authorityHost = VisualStudioTeamServices.Authentication.Authority.GetAuthorityUrl(tenantId); + string authorityHost = AzureDevOps.Authentication.Authority.GetAuthorityUrl(tenantId); Authority = new Authority(context, authorityHost); } } @@ -70,22 +70,22 @@ public sealed class AadAuthentication : Authentication, IAadAuthentication internal AadAuthentication( RuntimeContext context, ICredentialStore personalAccessTokenStore, - ITokenStore vstsIdeTokenCache, - IAuthority vstsAuthority) + ITokenStore vsIdeTokenCache, + IAuthority devopsAuthority) : base(context, personalAccessTokenStore, - vstsIdeTokenCache, - vstsAuthority) + vsIdeTokenCache, + devopsAuthority) { } /// - /// 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. + /// 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. /// /// Tokens acquired are stored in the secure secret stores provided during initialization. /// /// Return a `` for resource access if successful; otherwise ``. /// - /// The URI of the VSTS resource. + /// The URI of the Azure DevOps resource. public async Task InteractiveLogon(TargetUri targetUri, PersonalAccessTokenOptions options) { BaseSecureStore.ValidateTargetUri(targetUri); @@ -110,13 +110,13 @@ public async Task InteractiveLogon(TargetUri targetUri, PersonalAcce } /// - /// 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. + /// 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. /// /// Tokens acquired are stored in the secure secret stores provided during initialization. /// /// Return a `` for resource access if successful; otherwise ``. /// - /// The URI of the VSTS resource. + /// The URI of the Azure DevOps resource. /// /// Requests a compact format personal access token if ``; otherwise requests a standard format personal access token. /// @@ -147,14 +147,14 @@ public async Task InteractiveLogon(TargetUri targetUri, bool request } /// - /// 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. + /// 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. /// /// Tokens acquired are stored in the secure secret stores provided during initialization. /// /// Return a `` for resource access if successful; otherwise ``. /// - /// The URL of the VSTS resource. - /// Options related to VSTS personal access creation. + /// The URL of the Azure DevOps resource. + /// Options related to Azure DevOps personal access creation. public async Task NoninteractiveLogon(TargetUri targetUri, PersonalAccessTokenOptions options) { BaseSecureStore.ValidateTargetUri(targetUri); @@ -171,7 +171,7 @@ public async Task NoninteractiveLogon(TargetUri targetUri, PersonalA } catch (AuthenticationException) { - Trace.WriteLine($"failed to acquire for '{targetUri}' token from VstsAuthority."); + Trace.WriteLine($"failed to acquire for '{targetUri}' token from Azure DevOps Authority."); } Trace.WriteLine($"non-interactive logon for '{targetUri}' failed"); @@ -179,13 +179,13 @@ public async Task NoninteractiveLogon(TargetUri targetUri, PersonalA } /// - /// 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. + /// 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. /// /// Tokens acquired are stored in the secure secret stores provided during initialization. /// /// Return a `` for resource access if successful; otherwise ``. /// - /// The URL of the VSTS resource. + /// The URL of the Azure DevOps resource. /// /// Requests a compact format personal access token if ``; otherwise requests a standard format personal access token. /// @@ -208,7 +208,7 @@ public async Task NoninteractiveLogon(TargetUri targetUri, bool requ } catch (AuthenticationException) { - Trace.WriteLine($"failed to acquire for '{targetUri}' token from VstsAuthority."); + Trace.WriteLine($"failed to acquire for '{targetUri}' token from Azure DevOps Authority."); } Trace.WriteLine($"non-interactive logon for '{targetUri}' failed"); diff --git a/VisualStudioTeamServices.Authentication/Src/Adal.cs b/AzureDevOps.Authentication/Src/Adal.cs similarity index 99% rename from VisualStudioTeamServices.Authentication/Src/Adal.cs rename to AzureDevOps.Authentication/Src/Adal.cs index a2e89942f..7568ff7ad 100644 --- a/VisualStudioTeamServices.Authentication/Src/Adal.cs +++ b/AzureDevOps.Authentication/Src/Adal.cs @@ -29,7 +29,7 @@ using AdalExtentions = Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContextIntegratedAuthExtensions; using Alm = Microsoft.Alm.Authentication; -namespace VisualStudioTeamServices.Authentication +namespace AzureDevOps.Authentication { public interface IAdal : Alm.IRuntimeService { diff --git a/VisualStudioTeamServices.Authentication/Src/AdalTokenCache.cs b/AzureDevOps.Authentication/Src/AdalTokenCache.cs similarity index 98% rename from VisualStudioTeamServices.Authentication/Src/AdalTokenCache.cs rename to AzureDevOps.Authentication/Src/AdalTokenCache.cs index a15fb4d73..5e9406b99 100644 --- a/VisualStudioTeamServices.Authentication/Src/AdalTokenCache.cs +++ b/AzureDevOps.Authentication/Src/AdalTokenCache.cs @@ -30,7 +30,7 @@ using Microsoft.Alm.Authentication; using ActiveDirectory = Microsoft.IdentityModel.Clients.ActiveDirectory; -namespace VisualStudioTeamServices.Authentication +namespace AzureDevOps.Authentication { internal class AdalTokenCache : ActiveDirectory.TokenCache { diff --git a/VisualStudioTeamServices.Authentication/Src/Authentication.cs b/AzureDevOps.Authentication/Src/Authentication.cs similarity index 96% rename from VisualStudioTeamServices.Authentication/Src/Authentication.cs rename to AzureDevOps.Authentication/Src/Authentication.cs index b0c8187db..e23a6eb93 100644 --- a/VisualStudioTeamServices.Authentication/Src/Authentication.cs +++ b/AzureDevOps.Authentication/Src/Authentication.cs @@ -33,12 +33,12 @@ using Microsoft.Alm.Authentication; using static System.StringComparer; -using static VisualStudioTeamServices.Authentication.Authority; +using static AzureDevOps.Authentication.Authority; -namespace VisualStudioTeamServices.Authentication +namespace AzureDevOps.Authentication { /// - /// Base functionality for performing authentication operations against Visual Studio Online. + /// Base functionality for performing authentication operations against Azure DevOps. /// public abstract class Authentication : BaseAuthentication { @@ -48,8 +48,8 @@ public abstract class Authentication : BaseAuthentication protected const string AdalRefreshPrefix = "ada"; - internal const string AzureBaseUrlHost = VisualStudioTeamServices.Authentication.Authority.AzureBaseUrlHost; - internal const string VstsBaseUrlHost = VisualStudioTeamServices.Authentication.Authority.VstsBaseUrlHost; + internal const string AzureBaseUrlHost = AzureDevOps.Authentication.Authority.AzureBaseUrlHost; + internal const string VstsBaseUrlHost = AzureDevOps.Authentication.Authority.VstsBaseUrlHost; private const char CachePairSeperator = '='; private const char CachePairTerminator = '\0'; @@ -161,7 +161,7 @@ public override async Task DeleteCredentials(TargetUri targetUri) /// /// Detects the backing authority of the end-point. /// - /// Returns `` if the authority is Visual Studio Online, along with the tenant identity; `` otherwise. + /// Returns `` if the authority is Azure DevOps, along with the tenant identity; `` otherwise. /// /// The resource which the authority protects. /// The identity of the authority tenant; `` otherwise. @@ -170,14 +170,14 @@ public override async Task DeleteCredentials(TargetUri targetUri) public static async Task DetectAuthority(RuntimeContext context, TargetUri targetUri) { const int GuidStringLength = 36; - const string VstsResourceTenantHeader = "X-VSS-ResourceTenant"; + const string XvssResourceTenantHeader = "X-VSS-ResourceTenant"; if (context is null) throw new ArgumentNullException(nameof(context)); if (targetUri is null) throw new ArgumentNullException(nameof(targetUri)); - // Assume VSTS using Azure "common tenant" (empty GUID). + // Assume Azure DevOps using Azure "common tenant" (empty GUID). var tenantId = Guid.Empty; // Compose the request Uri, by default it is the target Uri. @@ -202,7 +202,7 @@ public override async Task DeleteCredentials(TargetUri targetUri) // Check the cache for an existing value. if (cache.TryGetValue(requestUrl, out tenantId)) { - context.Trace.WriteLine($"'{requestUrl}' is VSTS, tenant resource is {{{tenantId.ToString("N")}}}."); + context.Trace.WriteLine($"'{requestUrl}' is Azure DevOps, tenant resource is {{{tenantId.ToString("N")}}}."); return tenantId; } @@ -215,15 +215,15 @@ public override async Task DeleteCredentials(TargetUri targetUri) try { - // Query the host use the response headers to determine if the host is VSTS or not. + // Query the host use the response headers to determine if the host is Azure DevOps or not. using (var response = await context.Network.HttpHeadAsync(requestUri, options)) { if (response.Headers != null) { - // If the "X-VSS-ResourceTenant" was returned, then it is VSTS and we'll need it's value. - if (response.Headers.TryGetValues(VstsResourceTenantHeader, out IEnumerable values)) + // If the "X-VSS-ResourceTenant" was returned, then it is Azure DevOps and we'll need it's value. + if (response.Headers.TryGetValues(XvssResourceTenantHeader, out IEnumerable values)) { - context.Trace.WriteLine($"detected '{requestUrl}' as VSTS from GET response."); + context.Trace.WriteLine($"detected '{requestUrl}' as Azure DevOps from GET response."); // The "Www-Authenticate" is a more reliable header, because it indicates the // authentication scheme that should be used to access the requested entity. @@ -293,7 +293,7 @@ public override async Task DeleteCredentials(TargetUri targetUri) context.Trace.WriteLine($"tenant resource for '{requestUrl}' is {{{tenantId.ToString("N")}}}."); - // Return the tenant identity to the caller because this is VSTS. + // Return the tenant identity to the caller because this is Azure DevOps. return tenantId; } } @@ -521,7 +521,7 @@ internal static string GetSecretKey(TargetUri targetUri, string prefix) // When the full path is specified, there's no reason to assume the path; otherwise attempt to // detect the actual target path information. - string targetUrl = (IsVstsUrl(targetUri) && !targetUri.HasPath) + string targetUrl = (IsAzureDevOpsUrl(targetUri) && !targetUri.HasPath) ? GetTargetUrl(targetUri, true) : targetUri.ToString(true, true, true); diff --git a/VisualStudioTeamServices.Authentication/Src/AuthenticationException.cs b/AzureDevOps.Authentication/Src/AuthenticationException.cs similarity index 97% rename from VisualStudioTeamServices.Authentication/Src/AuthenticationException.cs rename to AzureDevOps.Authentication/Src/AuthenticationException.cs index 28771f953..9e4a8d758 100644 --- a/VisualStudioTeamServices.Authentication/Src/AuthenticationException.cs +++ b/AzureDevOps.Authentication/Src/AuthenticationException.cs @@ -26,7 +26,7 @@ using System; using System.Runtime.Serialization; -namespace VisualStudioTeamServices.Authentication +namespace AzureDevOps.Authentication { [Serializable] public class AuthenticationException : Exception diff --git a/VisualStudioTeamServices.Authentication/Src/Authority.cs b/AzureDevOps.Authentication/Src/Authority.cs similarity index 98% rename from VisualStudioTeamServices.Authentication/Src/Authority.cs rename to AzureDevOps.Authentication/Src/Authority.cs index 4a61e2630..4aaf8958f 100644 --- a/VisualStudioTeamServices.Authentication/Src/Authority.cs +++ b/AzureDevOps.Authentication/Src/Authority.cs @@ -34,7 +34,7 @@ using static System.StringComparer; using Culture = System.Globalization.CultureInfo; -namespace VisualStudioTeamServices.Authentication +namespace AzureDevOps.Authentication { /// /// Interfaces with Azure to perform authentication and identity services. @@ -57,7 +57,7 @@ internal class Authority : Base, IAuthority public const string DefaultAuthorityHostUrl = AuthorityHostUrlBase + "/common"; /// - /// The root domain of VSTS hosted repositories. + /// The root domain of Azure DevOps hosted repositories. /// public const string VstsBaseUrlHost = "visualstudio.com"; @@ -259,7 +259,7 @@ public async Task PopulateTokenTargetId(TargetUri targetUri, Token authori try { - // Create an request to the VSTS deployment data end-point. + // Create an request to the Azure DevOps deployment data end-point. var requestUri = GetConnectionDataUri(targetUri); var options = new NetworkRequestOptions(true) { @@ -325,14 +325,14 @@ public async Task ValidateToken(TargetUri targetUri, Token token) internal static TargetUri GetConnectionDataUri(TargetUri targetUri) { - const string VstsValidationUrlPath = "_apis/connectiondata"; + const string AzureDevOpsValidationUrlPath = "_apis/connectiondata"; if (targetUri is null) throw new ArgumentNullException(nameof(targetUri)); // Create a URL to the connection data end-point, it's deployment level and "always on". string requestUrl = GetTargetUrl(targetUri, false); - string validationUrl = requestUrl + VstsValidationUrlPath; + string validationUrl = requestUrl + AzureDevOpsValidationUrlPath; return targetUri.CreateWith(validationUrl); } @@ -417,7 +417,7 @@ internal static string GetTargetUrl(TargetUri targetUri, bool keepUsername) return requestUrl; } - internal static bool IsVstsUrl(TargetUri targetUri) + internal static bool IsAzureDevOpsUrl(TargetUri targetUri) { return (OrdinalIgnoreCase.Equals(targetUri.Scheme, Uri.UriSchemeHttp) || OrdinalIgnoreCase.Equals(targetUri.Scheme, Uri.UriSchemeHttps)) @@ -435,7 +435,7 @@ internal async Task ValidateSecret(TargetUri targetUri, Secret secret) if (secret is null) return false; - // Create an request to the VSTS deployment data end-point. + // Create an request to the Azure DevOps deployment data end-point. var requestUri = GetConnectionDataUri(targetUri); var options = new NetworkRequestOptions(true) { diff --git a/VisualStudioTeamServices.Authentication/Src/VisualStudioTeamServices.Authentication.csproj b/AzureDevOps.Authentication/Src/AzureDevOps.Authentication.csproj similarity index 93% rename from VisualStudioTeamServices.Authentication/Src/VisualStudioTeamServices.Authentication.csproj rename to AzureDevOps.Authentication/Src/AzureDevOps.Authentication.csproj index 35e8f4e4d..7d81070b4 100644 --- a/VisualStudioTeamServices.Authentication/Src/VisualStudioTeamServices.Authentication.csproj +++ b/AzureDevOps.Authentication/Src/AzureDevOps.Authentication.csproj @@ -4,12 +4,12 @@ Properties - VisualStudioTeamServices.Authentication - + AzureDevOps.Authentication + Library {19770407-D7D8-4A37-914C-F552FF4B90D4} - VisualStudioTeamServices.Authentication - VisualStudioTeamServices.Authentication + AzureDevOps.Authentication + AzureDevOps.Authentication v4.5.1 diff --git a/VisualStudioTeamServices.Authentication/Src/Base.cs b/AzureDevOps.Authentication/Src/Base.cs similarity index 97% rename from VisualStudioTeamServices.Authentication/Src/Base.cs rename to AzureDevOps.Authentication/Src/Base.cs index 37913bc1c..d56bec0af 100644 --- a/VisualStudioTeamServices.Authentication/Src/Base.cs +++ b/AzureDevOps.Authentication/Src/Base.cs @@ -25,7 +25,7 @@ using Microsoft.Alm.Authentication; -namespace VisualStudioTeamServices.Authentication +namespace AzureDevOps.Authentication { public abstract class Base : Microsoft.Alm.Authentication.Base { diff --git a/VisualStudioTeamServices.Authentication/Src/IAadAuthentication.cs b/AzureDevOps.Authentication/Src/IAadAuthentication.cs similarity index 86% rename from VisualStudioTeamServices.Authentication/Src/IAadAuthentication.cs rename to AzureDevOps.Authentication/Src/IAadAuthentication.cs index a3879a5ba..3dfd266f2 100644 --- a/VisualStudioTeamServices.Authentication/Src/IAadAuthentication.cs +++ b/AzureDevOps.Authentication/Src/IAadAuthentication.cs @@ -27,28 +27,28 @@ using System.Threading.Tasks; using Microsoft.Alm.Authentication; -namespace VisualStudioTeamServices.Authentication +namespace AzureDevOps.Authentication { public interface IAadAuthentication { /// - /// 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. + /// 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. /// /// Tokens acquired are stored in the secure secret stores provided during initialization. /// /// Return a `` for resource access if successful; otherwise ``. /// - /// The URI of the VSTS resource. + /// The URI of the Azure DevOps resource. Task InteractiveLogon(TargetUri targetUri, PersonalAccessTokenOptions options); /// - /// 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. + /// 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. /// /// Tokens acquired are stored in the secure secret stores provided during initialization. /// /// Return a `` for resource access if successful; otherwise ``. /// - /// The URI of the VSTS resource. + /// The URI of the Azure DevOps resource. /// /// Requests a compact format personal access token if ``; otherwise requests a standard format personal access token. /// @@ -58,24 +58,24 @@ public interface IAadAuthentication Task InteractiveLogon(TargetUri targetUri, bool requestCompactToken); /// - /// 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. + /// 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. /// /// Tokens acquired are stored in the secure secret stores provided during initialization. /// /// Return a `` for resource access if successful; otherwise ``. /// - /// The URL of the VSTS resource. - /// Options related to VSTS personal access creation. + /// The URL of the Azure DevOps resource. + /// Options related to Azure DevOps personal access creation. Task NoninteractiveLogon(TargetUri targetUri, PersonalAccessTokenOptions options); /// - /// 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. + /// 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. /// /// Tokens acquired are stored in the secure secret stores provided during initialization. /// /// Return a `` for resource access if successful; otherwise ``. /// - /// The URL of the VSTS resource. + /// The URL of the Azure DevOps resource. /// /// Requests a compact format personal access token if ``; otherwise requests a standard format personal access token. /// diff --git a/VisualStudioTeamServices.Authentication/Src/IAuthority.cs b/AzureDevOps.Authentication/Src/IAuthority.cs similarity index 91% rename from VisualStudioTeamServices.Authentication/Src/IAuthority.cs rename to AzureDevOps.Authentication/Src/IAuthority.cs index a3dd88883..5ac67909d 100644 --- a/VisualStudioTeamServices.Authentication/Src/IAuthority.cs +++ b/AzureDevOps.Authentication/Src/IAuthority.cs @@ -27,12 +27,12 @@ using System.Threading.Tasks; using Microsoft.Alm.Authentication; -namespace VisualStudioTeamServices.Authentication +namespace AzureDevOps.Authentication { public interface IAuthority { /// - /// Generates a personal access token for use with Visual Studio Team Services. + /// Generates a personal access token for use with Azure DevOps. /// /// Returns the acquired `` if successful; otherwise ``; /// @@ -48,7 +48,7 @@ public interface IAuthority Task GeneratePersonalAccessToken(TargetUri targetUri, Token accessToken, TokenScope tokenScope, bool requireCompactToken, TimeSpan? tokenDuration); /// - /// Generates a personal access token for use with Visual Studio Team Services. + /// Generates a personal access token for use with Azure DevOps. /// /// Returns the acquired `` if successful; otherwise ``; /// @@ -82,21 +82,21 @@ public interface IAuthority Task NoninteractiveAcquireToken(TargetUri targetUri, string clientId, string resource, Uri redirectUri); /// - /// Validates that a `` is valid to grant access to the VSTS resource referenced by ``. + /// Validates that a `` is valid to grant access to the Azure DevOps resource referenced by ``. /// /// Returns `` if successful; otherwise ``. /// /// URI of the VSTS resource. - /// `` expected to grant access to the VSTS service. + /// `` expected to grant access to the Azure DevOps service. Task ValidateCredentials(TargetUri targetUri, Credential credentials); /// - /// Validates that a `` is valid to grant access to the VSTS resource referenced by ``. + /// Validates that a `` is valid to grant access to the Azure DevOps resource referenced by ``. /// /// Returns `` if successful; otherwise ``. /// - /// URI of the VSTS resource. - /// `` expected to grant access to the VSTS resource. + /// URI of the Azure DevOps resource. + /// `` expected to grant access to the Azure DevOps resource. Task ValidateToken(TargetUri targetUri, Token token); } } diff --git a/VisualStudioTeamServices.Authentication/Src/IMsaAuthentication.cs b/AzureDevOps.Authentication/Src/IMsaAuthentication.cs similarity index 98% rename from VisualStudioTeamServices.Authentication/Src/IMsaAuthentication.cs rename to AzureDevOps.Authentication/Src/IMsaAuthentication.cs index 99950944c..64cd1c08a 100644 --- a/VisualStudioTeamServices.Authentication/Src/IMsaAuthentication.cs +++ b/AzureDevOps.Authentication/Src/IMsaAuthentication.cs @@ -26,7 +26,7 @@ using System.Threading.Tasks; using Microsoft.Alm.Authentication; -namespace VisualStudioTeamServices.Authentication +namespace AzureDevOps.Authentication { public interface IMsaAuthentication { diff --git a/VisualStudioTeamServices.Authentication/Src/LocationServiceException.cs b/AzureDevOps.Authentication/Src/LocationServiceException.cs similarity index 97% rename from VisualStudioTeamServices.Authentication/Src/LocationServiceException.cs rename to AzureDevOps.Authentication/Src/LocationServiceException.cs index 76560f1b7..c74380c4f 100644 --- a/VisualStudioTeamServices.Authentication/Src/LocationServiceException.cs +++ b/AzureDevOps.Authentication/Src/LocationServiceException.cs @@ -25,7 +25,7 @@ using System; -namespace VisualStudioTeamServices.Authentication +namespace AzureDevOps.Authentication { [Serializable] public sealed class LocationServiceException : Exception, System.Runtime.Serialization.ISerializable diff --git a/VisualStudioTeamServices.Authentication/Src/MsaAuthentication.cs b/AzureDevOps.Authentication/Src/MsaAuthentication.cs similarity index 97% rename from VisualStudioTeamServices.Authentication/Src/MsaAuthentication.cs rename to AzureDevOps.Authentication/Src/MsaAuthentication.cs index b38581ab0..51eb51daa 100644 --- a/VisualStudioTeamServices.Authentication/Src/MsaAuthentication.cs +++ b/AzureDevOps.Authentication/Src/MsaAuthentication.cs @@ -28,12 +28,12 @@ using System.Threading.Tasks; using Microsoft.Alm.Authentication; -namespace VisualStudioTeamServices.Authentication +namespace AzureDevOps.Authentication { public sealed class MsaAuthentication : Authentication, IMsaAuthentication { - public const string DefaultAuthorityHost = VisualStudioTeamServices.Authentication.Authority.AuthorityHostUrlBase + "/live.com"; + public const string DefaultAuthorityHost = AzureDevOps.Authentication.Authority.AuthorityHostUrlBase + "/live.com"; internal const string QueryParameters = "domain_hint=live.com&display=popup&site_id=501454&nux=1"; public MsaAuthentication( diff --git a/VisualStudioTeamServices.Authentication/Src/PersonalAccessTokenOptions.cs b/AzureDevOps.Authentication/Src/PersonalAccessTokenOptions.cs similarity index 93% rename from VisualStudioTeamServices.Authentication/Src/PersonalAccessTokenOptions.cs rename to AzureDevOps.Authentication/Src/PersonalAccessTokenOptions.cs index bcf67b4af..5f695aab8 100644 --- a/VisualStudioTeamServices.Authentication/Src/PersonalAccessTokenOptions.cs +++ b/AzureDevOps.Authentication/Src/PersonalAccessTokenOptions.cs @@ -26,7 +26,7 @@ using System; using System.Diagnostics; -namespace VisualStudioTeamServices.Authentication +namespace AzureDevOps.Authentication { [DebuggerDisplay("{DebuggerDisplay, nq}")] public struct PersonalAccessTokenOptions @@ -92,7 +92,7 @@ public TokenScope TokenScope internal string DebuggerDisplay { - get { return $"{nameof(VisualStudioTeamServices.Authentication.TokenScope)}: {(_compact ? "Compact" : "Normal")} {((_scope == null) ? "Default" : _scope.Value)} [{(_duration.HasValue ? _duration.Value.ToString("u") : "Default")}]"; } + get { return $"{nameof(AzureDevOps.Authentication.TokenScope)}: {(_compact ? "Compact" : "Normal")} {((_scope == null) ? "Default" : _scope.Value)} [{(_duration.HasValue ? _duration.Value.ToString("u") : "Default")}]"; } } public override bool Equals(object obj) diff --git a/VisualStudioTeamServices.Authentication/Src/Properties/AssemblyInfo.cs b/AzureDevOps.Authentication/Src/Properties/AssemblyInfo.cs similarity index 69% rename from VisualStudioTeamServices.Authentication/Src/Properties/AssemblyInfo.cs rename to AzureDevOps.Authentication/Src/Properties/AssemblyInfo.cs index fb32ea1ee..ab9a10b28 100644 --- a/VisualStudioTeamServices.Authentication/Src/Properties/AssemblyInfo.cs +++ b/AzureDevOps.Authentication/Src/Properties/AssemblyInfo.cs @@ -3,8 +3,8 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -[assembly: AssemblyTitle("Visual Studio Team Services Authentication")] -[assembly: AssemblyDescription("Microsoft Visual Studio Team Services Authentication Library for Windows")] +[assembly: AssemblyTitle("Azure DevOps Authentication")] +[assembly: AssemblyDescription("Microsoft Azure DevOps Authentication Library for Windows")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("https://github.com/Microsoft/Git-Credential-Manager-for-Windows")] @@ -19,6 +19,6 @@ // Only expose internals when the binary isn't signed. #if !SIGNED -[assembly: InternalsVisibleTo("VisualStudioTeamServices.Authentication.Proxy")] -[assembly: InternalsVisibleTo("VisualStudioTeamServices.Authentication.Test")] +[assembly: InternalsVisibleTo("AzureDevOps.Authentication.Proxy")] +[assembly: InternalsVisibleTo("AzureDevOps.Authentication.Test")] #endif diff --git a/VisualStudioTeamServices.Authentication/Src/TokenRegistry.cs b/AzureDevOps.Authentication/Src/TokenRegistry.cs similarity index 99% rename from VisualStudioTeamServices.Authentication/Src/TokenRegistry.cs rename to AzureDevOps.Authentication/Src/TokenRegistry.cs index ace7c86bc..f797b6d4c 100644 --- a/VisualStudioTeamServices.Authentication/Src/TokenRegistry.cs +++ b/AzureDevOps.Authentication/Src/TokenRegistry.cs @@ -31,7 +31,7 @@ using Microsoft.Alm.Authentication; using Microsoft.Win32; -namespace VisualStudioTeamServices.Authentication +namespace AzureDevOps.Authentication { /// /// A token storage object which interacts with the current user's Visual Studio 2015 hive in the Windows Registry. diff --git a/VisualStudioTeamServices.Authentication/Src/TokenScope.cs b/AzureDevOps.Authentication/Src/TokenScope.cs similarity index 98% rename from VisualStudioTeamServices.Authentication/Src/TokenScope.cs rename to AzureDevOps.Authentication/Src/TokenScope.cs index 4de00cc54..2f972883b 100644 --- a/VisualStudioTeamServices.Authentication/Src/TokenScope.cs +++ b/AzureDevOps.Authentication/Src/TokenScope.cs @@ -29,7 +29,7 @@ using System.Runtime.CompilerServices; using ScopeSet = System.Collections.Generic.HashSet; -namespace VisualStudioTeamServices.Authentication +namespace AzureDevOps.Authentication { public class TokenScope : Microsoft.Alm.Authentication.TokenScope { @@ -217,11 +217,11 @@ public override bool Equals(object obj) public bool Equals(TokenScope other) => Microsoft.Alm.Authentication.TokenScope.Equals(this as Microsoft.Alm.Authentication.TokenScope, other as Microsoft.Alm.Authentication.TokenScope); - public static bool Find(string value, out TokenScope vstsScope) + public static bool Find(string value, out TokenScope devopsScope) { - vstsScope = EnumerateValues().FirstOrDefault(v => StringComparer.OrdinalIgnoreCase.Equals(v.Value, value)); + devopsScope = EnumerateValues().FirstOrDefault(v => StringComparer.OrdinalIgnoreCase.Equals(v.Value, value)); - return vstsScope != null; + return devopsScope != null; } public override int GetHashCode() diff --git a/VisualStudioTeamServices.Authentication/Src/packages.config b/AzureDevOps.Authentication/Src/packages.config similarity index 100% rename from VisualStudioTeamServices.Authentication/Src/packages.config rename to AzureDevOps.Authentication/Src/packages.config diff --git a/VisualStudioTeamServices.Authentication/Test/AadTests.cs b/AzureDevOps.Authentication/Test/AadTests.cs similarity index 83% rename from VisualStudioTeamServices.Authentication/Test/AadTests.cs rename to AzureDevOps.Authentication/Test/AadTests.cs index 999124ac9..624b6c299 100644 --- a/VisualStudioTeamServices.Authentication/Test/AadTests.cs +++ b/AzureDevOps.Authentication/Test/AadTests.cs @@ -27,7 +27,7 @@ using Microsoft.Alm.Authentication; using Xunit; -namespace VisualStudioTeamServices.Authentication.Test +namespace AzureDevOps.Authentication.Test { public class AadTests : AuthenticationTests { @@ -39,7 +39,7 @@ public AadTests() public async Task VstsAadDeleteCredentialsTest() { TargetUri targetUri = DefaultTargetUri; - AadAuthentication aadAuthentication = GetVstsAadAuthentication(RuntimeContext.Default, "aad-delete"); + AadAuthentication aadAuthentication = GetDevOpsAadAuthentication(RuntimeContext.Default, "aad-delete"); if (aadAuthentication.Authority is AuthorityFake fake) { @@ -59,7 +59,7 @@ public async Task VstsAadDeleteCredentialsTest() public async Task VstsAadGetCredentialsTest() { TargetUri targetUri = DefaultTargetUri; - AadAuthentication aadAuthentication = GetVstsAadAuthentication(RuntimeContext.Default, "aad-get"); + AadAuthentication aadAuthentication = GetDevOpsAadAuthentication(RuntimeContext.Default, "aad-get"); Assert.Null(await aadAuthentication.GetCredentials(targetUri)); @@ -72,7 +72,7 @@ public async Task VstsAadGetCredentialsTest() public async Task VstsAadInteractiveLogonTest() { TargetUri targetUri = DefaultTargetUri; - AadAuthentication aadAuthentication = GetVstsAadAuthentication(RuntimeContext.Default, "aad-logon"); + AadAuthentication aadAuthentication = GetDevOpsAadAuthentication(RuntimeContext.Default, "aad-logon"); Assert.Null(await aadAuthentication.PersonalAccessTokenStore.ReadCredentials(targetUri)); @@ -85,7 +85,7 @@ public async Task VstsAadInteractiveLogonTest() public async Task VstsAadNoninteractiveLogonTest() { TargetUri targetUri = DefaultTargetUri; - AadAuthentication aadAuthentication = GetVstsAadAuthentication(RuntimeContext.Default, "aad-noninteractive"); + AadAuthentication aadAuthentication = GetDevOpsAadAuthentication(RuntimeContext.Default, "aad-noninteractive"); Assert.NotNull(await aadAuthentication.NoninteractiveLogon(targetUri, new PersonalAccessTokenOptions { RequireCompactToken = false })); @@ -96,7 +96,7 @@ public async Task VstsAadNoninteractiveLogonTest() public async Task VstsAadSetCredentialsTest() { TargetUri targetUri = DefaultTargetUri; - AadAuthentication aadAuthentication = GetVstsAadAuthentication(RuntimeContext.Default, "aad-set"); + AadAuthentication aadAuthentication = GetDevOpsAadAuthentication(RuntimeContext.Default, "aad-set"); Credential credentials = DefaultCredentials; await aadAuthentication.SetCredentials(targetUri, credentials); @@ -108,7 +108,7 @@ public async Task VstsAadSetCredentialsTest() [Fact] public async Task VstsAadValidateCredentialsTest() { - AadAuthentication aadAuthentication = GetVstsAadAuthentication(RuntimeContext.Default, "aad-validate"); + AadAuthentication aadAuthentication = GetDevOpsAadAuthentication(RuntimeContext.Default, "aad-validate"); Credential credentials = null; Assert.False(await aadAuthentication.ValidateCredentials(DefaultTargetUri, credentials), "Credential validation unexpectedly failed."); @@ -118,14 +118,14 @@ public async Task VstsAadValidateCredentialsTest() Assert.True(await aadAuthentication.ValidateCredentials(DefaultTargetUri, credentials), "Credential validation unexpectedly failed."); } - private static AadAuthentication GetVstsAadAuthentication(RuntimeContext context, string @namespace) + private static AadAuthentication GetDevOpsAadAuthentication(RuntimeContext context, string @namespace) { string expectedQueryParameters = null; ICredentialStore tokenStore1 = new SecretCache(context, @namespace + 1, Secret.UriToIdentityUrl); ITokenStore tokenStore2 = new SecretCache(context, @namespace + 2, Secret.UriToIdentityUrl); - IAuthority vstsAuthority = new AuthorityFake(expectedQueryParameters); - return new AadAuthentication(context, tokenStore1, tokenStore2, vstsAuthority); + IAuthority devopsAuthority = new AuthorityFake(expectedQueryParameters); + return new AadAuthentication(context, tokenStore1, tokenStore2, devopsAuthority); } } } diff --git a/VisualStudioTeamServices.Authentication/Test/AuthenticationTests.cs b/AzureDevOps.Authentication/Test/AuthenticationTests.cs similarity index 98% rename from VisualStudioTeamServices.Authentication/Test/AuthenticationTests.cs rename to AzureDevOps.Authentication/Test/AuthenticationTests.cs index 5209bb8ef..5b1d176dc 100644 --- a/VisualStudioTeamServices.Authentication/Test/AuthenticationTests.cs +++ b/AzureDevOps.Authentication/Test/AuthenticationTests.cs @@ -26,7 +26,7 @@ using System.Diagnostics; using Microsoft.Alm.Authentication; -namespace VisualStudioTeamServices.Authentication.Test +namespace AzureDevOps.Authentication.Test { public abstract class AuthenticationTests { diff --git a/VisualStudioTeamServices.Authentication/Test/AuthorityFake.cs b/AzureDevOps.Authentication/Test/AuthorityFake.cs similarity index 92% rename from VisualStudioTeamServices.Authentication/Test/AuthorityFake.cs rename to AzureDevOps.Authentication/Test/AuthorityFake.cs index 1d3627aa4..c4418e4e1 100644 --- a/VisualStudioTeamServices.Authentication/Test/AuthorityFake.cs +++ b/AzureDevOps.Authentication/Test/AuthorityFake.cs @@ -28,7 +28,7 @@ using Microsoft.Alm.Authentication; using Xunit; -namespace VisualStudioTeamServices.Authentication.Test +namespace AzureDevOps.Authentication.Test { internal class AuthorityFake : IAuthority { @@ -44,7 +44,7 @@ public AuthorityFake(string expectedQueryParameters) public bool CredentialsAreValid { get; set; } /// - /// Generates a personal access token for use with Visual Studio Team Services. + /// Generates a personal access token for use with Azure DevOps. /// /// Returns the acquired token if successful; otherwise ; /// @@ -63,7 +63,7 @@ public async Task GeneratePersonalAccessToken(TargetUri targetUri, Token } /// - /// Generates a personal access token for use with Visual Studio Team Services. + /// Generates a personal access token for use with Azure DevOps. /// /// Returns the acquired token if successful; otherwise ; /// @@ -106,12 +106,12 @@ public async Task NoninteractiveAcquireToken(TargetUri targetUri, string } /// - /// Validates that a `` is valid to grant access to the VSTS resource referenced by ``. + /// Validates that a `` is valid to grant access to the Azure DevOps resource referenced by ``. /// /// Returns `` if successful; otherwise ``. /// - /// URI of the VSTS resource. - /// `` expected to grant access to the VSTS service. + /// URI of the Azure DevOps resource. + /// `` expected to grant access to the Azure DevOps service. public async Task ValidateCredentials(TargetUri targetUri, Credential credentials) { return await Task.Run(() => @@ -129,12 +129,12 @@ public async Task ValidateCredentials(TargetUri targetUri, Credential cred } /// - /// Validates that a `` is valid to grant access to the VSTS resource referenced by ``. + /// Validates that a `` is valid to grant access to the Azure DevOps resource referenced by ``. /// /// Returns `` if successful; otherwise ``. /// - /// URI of the VSTS resource. - /// `` expected to grant access to the VSTS resource. + /// URI of the Azure DevOps resource. + /// `` expected to grant access to the Azure DevOps resource. public async Task ValidateToken(TargetUri targetUri, Token token) { return await Task.Run(() => diff --git a/VisualStudioTeamServices.Authentication/Test/AuthorityTests.cs b/AzureDevOps.Authentication/Test/AuthorityTests.cs similarity index 99% rename from VisualStudioTeamServices.Authentication/Test/AuthorityTests.cs rename to AzureDevOps.Authentication/Test/AuthorityTests.cs index 65fd0240a..f8cb3c216 100644 --- a/VisualStudioTeamServices.Authentication/Test/AuthorityTests.cs +++ b/AzureDevOps.Authentication/Test/AuthorityTests.cs @@ -30,7 +30,7 @@ using Microsoft.Alm.Authentication.Test; using Xunit; -namespace VisualStudioTeamServices.Authentication.Test +namespace AzureDevOps.Authentication.Test { public class AuthorityTests : UnitTestBase { diff --git a/VisualStudioTeamServices.Authentication/Test/VisualStudioTeamServices.Authentication.Test.csproj b/AzureDevOps.Authentication/Test/AzureDevOps.Authentication.Test.csproj similarity index 93% rename from VisualStudioTeamServices.Authentication/Test/VisualStudioTeamServices.Authentication.Test.csproj rename to AzureDevOps.Authentication/Test/AzureDevOps.Authentication.Test.csproj index e58db2824..9d26c7c27 100644 --- a/VisualStudioTeamServices.Authentication/Test/VisualStudioTeamServices.Authentication.Test.csproj +++ b/AzureDevOps.Authentication/Test/AzureDevOps.Authentication.Test.csproj @@ -4,13 +4,13 @@ - VisualStudioTeamServices.Authentication.Test + AzureDevOps.Authentication.Test Properties False {19781214-5254-464A-BC69-FAC502046564} - VisualStudioTeamServices.Authentication.Test + AzureDevOps.Authentication.Test @@ -54,13 +54,13 @@ {19781214-371f-415c-93c5-44ceaa0e9a34} Microsoft.Alm.Authentication.Test - + {04151231-4fa4-49b2-ae6d-ebdba36b1169} - VisualStudioTeamServices.Authentication.Proxy + AzureDevOps.Authentication.Proxy - + {19770407-d7d8-4a37-914c-f552ff4b90d4} - VisualStudioTeamServices.Authentication + AzureDevOps.Authentication diff --git a/VisualStudioTeamServices.Authentication/Test/Data/AuthorityTests_ValidateCredentials_Failed.json b/AzureDevOps.Authentication/Test/Data/AuthorityTests_ValidateCredentials_Failed.json similarity index 100% rename from VisualStudioTeamServices.Authentication/Test/Data/AuthorityTests_ValidateCredentials_Failed.json rename to AzureDevOps.Authentication/Test/Data/AuthorityTests_ValidateCredentials_Failed.json diff --git a/VisualStudioTeamServices.Authentication/Test/Data/AuthorityTests_ValidateCredentials_Null.json b/AzureDevOps.Authentication/Test/Data/AuthorityTests_ValidateCredentials_Null.json similarity index 100% rename from VisualStudioTeamServices.Authentication/Test/Data/AuthorityTests_ValidateCredentials_Null.json rename to AzureDevOps.Authentication/Test/Data/AuthorityTests_ValidateCredentials_Null.json diff --git a/VisualStudioTeamServices.Authentication/Test/Data/AuthorityTests_ValidateCredentials_Success.json b/AzureDevOps.Authentication/Test/Data/AuthorityTests_ValidateCredentials_Success.json similarity index 100% rename from VisualStudioTeamServices.Authentication/Test/Data/AuthorityTests_ValidateCredentials_Success.json rename to AzureDevOps.Authentication/Test/Data/AuthorityTests_ValidateCredentials_Success.json diff --git a/VisualStudioTeamServices.Authentication/Test/Data/AuthorityTests_ValidateToken_Access_Failed.json b/AzureDevOps.Authentication/Test/Data/AuthorityTests_ValidateToken_Access_Failed.json similarity index 100% rename from VisualStudioTeamServices.Authentication/Test/Data/AuthorityTests_ValidateToken_Access_Failed.json rename to AzureDevOps.Authentication/Test/Data/AuthorityTests_ValidateToken_Access_Failed.json diff --git a/VisualStudioTeamServices.Authentication/Test/Data/AuthorityTests_ValidateToken_Federated_Failed.json b/AzureDevOps.Authentication/Test/Data/AuthorityTests_ValidateToken_Federated_Failed.json similarity index 100% rename from VisualStudioTeamServices.Authentication/Test/Data/AuthorityTests_ValidateToken_Federated_Failed.json rename to AzureDevOps.Authentication/Test/Data/AuthorityTests_ValidateToken_Federated_Failed.json diff --git a/VisualStudioTeamServices.Authentication/Test/Data/AuthorityTests_ValidateToken_Null.json b/AzureDevOps.Authentication/Test/Data/AuthorityTests_ValidateToken_Null.json similarity index 100% rename from VisualStudioTeamServices.Authentication/Test/Data/AuthorityTests_ValidateToken_Null.json rename to AzureDevOps.Authentication/Test/Data/AuthorityTests_ValidateToken_Null.json diff --git a/VisualStudioTeamServices.Authentication/Test/Data/AuthorityTests_ValidateToken_Success.json b/AzureDevOps.Authentication/Test/Data/AuthorityTests_ValidateToken_Success.json similarity index 100% rename from VisualStudioTeamServices.Authentication/Test/Data/AuthorityTests_ValidateToken_Success.json rename to AzureDevOps.Authentication/Test/Data/AuthorityTests_ValidateToken_Success.json diff --git a/VisualStudioTeamServices.Authentication/Test/MsaTests.cs b/AzureDevOps.Authentication/Test/MsaTests.cs similarity index 79% rename from VisualStudioTeamServices.Authentication/Test/MsaTests.cs rename to AzureDevOps.Authentication/Test/MsaTests.cs index d00ba340f..54174f683 100644 --- a/VisualStudioTeamServices.Authentication/Test/MsaTests.cs +++ b/AzureDevOps.Authentication/Test/MsaTests.cs @@ -27,7 +27,7 @@ using Microsoft.Alm.Authentication; using Xunit; -namespace VisualStudioTeamServices.Authentication.Test +namespace AzureDevOps.Authentication.Test { public class MsaTests : AuthenticationTests { @@ -36,10 +36,10 @@ public MsaTests() { } [Fact] - public async Task VstsMsaDeleteCredentialsTest() + public async Task DevOpsMsaDeleteCredentialsTest() { TargetUri targetUri = DefaultTargetUri; - MsaAuthentication msaAuthority = GetVstsMsaAuthentication(RuntimeContext.Default, "msa-delete"); + MsaAuthentication msaAuthority = GetDevOpsMsaAuthentication(RuntimeContext.Default, "msa-delete"); if (msaAuthority.Authority is AuthorityFake fake) { @@ -56,10 +56,10 @@ public async Task VstsMsaDeleteCredentialsTest() } [Fact] - public async Task VstsMsaGetCredentialsTest() + public async Task DevOpsMsaGetCredentialsTest() { TargetUri targetUri = DefaultTargetUri; - MsaAuthentication msaAuthority = GetVstsMsaAuthentication(RuntimeContext.Default, "msa-get"); + MsaAuthentication msaAuthority = GetDevOpsMsaAuthentication(RuntimeContext.Default, "msa-get"); Assert.Null(await msaAuthority.GetCredentials(targetUri)); @@ -69,10 +69,10 @@ public async Task VstsMsaGetCredentialsTest() } [Fact] - public async Task VstsMsaInteractiveLogonTest() + public async Task DevOpsMsaInteractiveLogonTest() { TargetUri targetUri = DefaultTargetUri; - MsaAuthentication msaAuthority = GetVstsMsaAuthentication(RuntimeContext.Default, "msa-logon"); + MsaAuthentication msaAuthority = GetDevOpsMsaAuthentication(RuntimeContext.Default, "msa-logon"); Assert.Null(await msaAuthority.PersonalAccessTokenStore.ReadCredentials(targetUri)); @@ -82,10 +82,10 @@ public async Task VstsMsaInteractiveLogonTest() } [Fact] - public async Task VstsMsaSetCredentialsTest() + public async Task DevOpsMsaSetCredentialsTest() { TargetUri targetUri = DefaultTargetUri; - MsaAuthentication msaAuthority = GetVstsMsaAuthentication(RuntimeContext.Default, "msa-set"); + MsaAuthentication msaAuthority = GetDevOpsMsaAuthentication(RuntimeContext.Default, "msa-set"); await msaAuthority.SetCredentials(targetUri, DefaultCredentials); @@ -93,9 +93,9 @@ public async Task VstsMsaSetCredentialsTest() } [Fact] - public async Task VstsMsaValidateCredentialsTest() + public async Task DevOpsMsaValidateCredentialsTest() { - MsaAuthentication msaAuthority = GetVstsMsaAuthentication(RuntimeContext.Default, "msa-validate"); + MsaAuthentication msaAuthority = GetDevOpsMsaAuthentication(RuntimeContext.Default, "msa-validate"); Credential credentials = null; Assert.False( await msaAuthority.ValidateCredentials(DefaultTargetUri, credentials), "Credential validation unexpectedly failed."); @@ -105,7 +105,7 @@ public async Task VstsMsaValidateCredentialsTest() Assert.True(await msaAuthority.ValidateCredentials(DefaultTargetUri, credentials), "Credential validation unexpectedly failed."); } - private static MsaAuthentication GetVstsMsaAuthentication(RuntimeContext context, string @namespace) + private static MsaAuthentication GetDevOpsMsaAuthentication(RuntimeContext context, string @namespace) { ICredentialStore tokenStore1 = new SecretCache(context, @namespace + 1, Secret.UriToIdentityUrl); ITokenStore tokenStore2 = new SecretCache(context, @namespace + 2, Secret.UriToIdentityUrl); diff --git a/VisualStudioTeamServices.Authentication/Test/Properties/AssemblyInfo.cs b/AzureDevOps.Authentication/Test/Properties/AssemblyInfo.cs similarity index 89% rename from VisualStudioTeamServices.Authentication/Test/Properties/AssemblyInfo.cs rename to AzureDevOps.Authentication/Test/Properties/AssemblyInfo.cs index 62d6280c7..b1b0283fb 100644 --- a/VisualStudioTeamServices.Authentication/Test/Properties/AssemblyInfo.cs +++ b/AzureDevOps.Authentication/Test/Properties/AssemblyInfo.cs @@ -3,11 +3,11 @@ // General Information about an assembly is controlled through the following set of attributes. // Change these attribute values to modify the information associated with an assembly. -[assembly: AssemblyTitle("VisualStudioTeamServices.Authentication.Test")] +[assembly: AssemblyTitle("AzureDevOps.Authentication.Test")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft Corporation")] -[assembly: AssemblyProduct("VisualStudioTeamServices.Authentication.Test")] +[assembly: AssemblyProduct("AzureDevOps.Authentication.Test")] [assembly: AssemblyCopyright("Copyright © Microsoft Corporation 2018. All rights reserved.")] [assembly: AssemblyTrademark("Microsoft Corporation")] [assembly: AssemblyCulture("")] diff --git a/VisualStudioTeamServices.Authentication/Test/TokenScopeTests.cs b/AzureDevOps.Authentication/Test/TokenScopeTests.cs similarity index 99% rename from VisualStudioTeamServices.Authentication/Test/TokenScopeTests.cs rename to AzureDevOps.Authentication/Test/TokenScopeTests.cs index 346a9acfe..b798e148d 100644 --- a/VisualStudioTeamServices.Authentication/Test/TokenScopeTests.cs +++ b/AzureDevOps.Authentication/Test/TokenScopeTests.cs @@ -26,7 +26,7 @@ using System.Collections.Generic; using Xunit; -namespace VisualStudioTeamServices.Authentication.Test +namespace AzureDevOps.Authentication.Test { public class TokenScopeTests { diff --git a/VisualStudioTeamServices.Authentication/Test/app.config b/AzureDevOps.Authentication/Test/app.config similarity index 100% rename from VisualStudioTeamServices.Authentication/Test/app.config rename to AzureDevOps.Authentication/Test/app.config diff --git a/VisualStudioTeamServices.Authentication/Test/packages.config b/AzureDevOps.Authentication/Test/packages.config similarity index 100% rename from VisualStudioTeamServices.Authentication/Test/packages.config rename to AzureDevOps.Authentication/Test/packages.config diff --git a/Cli/Askpass/Cli-Askpass.csproj b/Cli/Askpass/Cli-Askpass.csproj index feb2353f3..00f4d33bb 100644 --- a/Cli/Askpass/Cli-Askpass.csproj +++ b/Cli/Askpass/Cli-Askpass.csproj @@ -6,7 +6,7 @@ Properties git-askpass true - + Exe {19770407-B33A-4EBE-92B8-04C93F43CAE0} Cli-Askpass @@ -49,9 +49,9 @@ {19770407-b493-459d-bb4f-04fbefb1ba13} Microsoft.Alm.Authentication - + {19770407-d7d8-4a37-914c-f552ff4b90d4} - VisualStudioTeamServices.Authentication + AzureDevops.Authentication @@ -65,8 +65,8 @@ - - + + diff --git a/Cli/Manager/Cli-Manager.csproj b/Cli/Manager/Cli-Manager.csproj index 682500b01..944e771d7 100644 --- a/Cli/Manager/Cli-Manager.csproj +++ b/Cli/Manager/Cli-Manager.csproj @@ -6,7 +6,7 @@ Properties git-credential-manager true - + Exe {19770407-63D4-40A8-A9DF-F1C4B473308A} Cli-Manager @@ -42,9 +42,9 @@ {19770407-b493-459d-bb4f-04fbefb1ba13} Microsoft.Alm.Authentication - + {19770407-d7d8-4a37-914c-f552ff4b90d4} - VisualStudioTeamServices.Authentication + AzureDevops.Authentication diff --git a/Cli/Manager/Installer.cs b/Cli/Manager/Installer.cs index a1100a093..36c0fcb93 100644 --- a/Cli/Manager/Installer.cs +++ b/Cli/Manager/Installer.cs @@ -45,16 +45,17 @@ internal class Installer private static readonly IReadOnlyList CopyList = new string[] { + "AzureDevOps.Authentication.dll", "Bitbucket.Authentication.dll", "git-askpass.exe", "git-credential-manager.exe", "GitHub.Authentication.exe", "Microsoft.Alm.Authentication.dll", "Microsoft.IdentityModel.Clients.ActiveDirectory.dll", - "VisualStudioTeamServices.Authentication.dll", }; private static readonly IReadOnlyList CleanList = new string[] { + "AzureDevOps.Authentication.dll", "Bitbucket.Authentication.dll", "git-askpass.exe", "git-credential-manager.exe", diff --git a/Cli/Manager/Program.cs b/Cli/Manager/Program.cs index a8ae550f9..8b99d8574 100644 --- a/Cli/Manager/Program.cs +++ b/Cli/Manager/Program.cs @@ -239,7 +239,7 @@ internal void Config() WriteLine($" UseHttpPath = {operationArguments.UseHttpPath}"); WriteLine($" UseModalUi = {operationArguments.UseModalUi}"); WriteLine($" ValidateCredentials = {operationArguments.ValidateCredentials}"); - WriteLine($" VstsTokenScope = {operationArguments.VstsTokenScope}"); + WriteLine($" DevOpsTokenScope = {operationArguments.DevOpsTokenScope}"); WriteLine($" WriteLog = {operationArguments.WriteLog}"); }).Wait(); } @@ -295,7 +295,7 @@ internal void Delete() case AuthorityType.AzureDirectory: case AuthorityType.MicrosoftAccount: - _context.Trace.WriteLine($"deleting VSTS credentials for '{operationArguments.TargetUri}'."); + _context.Trace.WriteLine($"deleting Azure DevOps credentials for '{operationArguments.TargetUri}'."); break; case AuthorityType.GitHub: @@ -519,7 +519,7 @@ internal void Store() case AuthorityType.AzureDirectory: case AuthorityType.MicrosoftAccount: - Trace.WriteLine($"storing VSTS credentials for '{operationArguments.TargetUri}'."); + Trace.WriteLine($"storing Azure DevOps credentials for '{operationArguments.TargetUri}'."); break; case AuthorityType.GitHub: diff --git a/Cli/Test/VstsLogonTests.cs b/Cli/Test/AzureDevOpsLogonTests.cs similarity index 99% rename from Cli/Test/VstsLogonTests.cs rename to Cli/Test/AzureDevOpsLogonTests.cs index 595f4ae7c..a1b161690 100644 --- a/Cli/Test/VstsLogonTests.cs +++ b/Cli/Test/AzureDevOpsLogonTests.cs @@ -31,11 +31,11 @@ namespace Microsoft.Alm.Cli.Test { - public class VstsLogonTests : VisualStudioTeamServices.Authentication.Test.UnitTestBase + public class AzureDevOpsLogonTests : AzureDevOps.Authentication.Test.UnitTestBase { private static readonly Encoding Utf8 = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false); - public VstsLogonTests(Xunit.Abstractions.ITestOutputHelper output) + public AzureDevOpsLogonTests(Xunit.Abstractions.ITestOutputHelper output) : base(XunitHelper.Convert(output)) { } diff --git a/Cli/Test/Cli-Test.csproj b/Cli/Test/Cli-Test.csproj index ce7422650..cc6a95490 100644 --- a/Cli/Test/Cli-Test.csproj +++ b/Cli/Test/Cli-Test.csproj @@ -57,9 +57,9 @@ {19781214-fe04-4a05-943a-54eb952cea62} Microsoft.Alm.Authentication.Proxy - - {19781214-4fa4-49b2-ae6d-ebdba36b1169} - VisualStudioTeamServices.Authentication.Proxy + + {04151231-4FA4-49B2-AE6D-EBDBA36B1169} + AzureDevops.Authentication.Proxy {19770407-63d4-40a8-a9df-f1c4b473308a} @@ -69,9 +69,9 @@ {19770407-b493-459d-bb4f-04fbefb1ba13} Microsoft.Alm.Authentication - + {19770407-d7d8-4a37-914c-f552ff4b90d4} - VisualStudioTeamServices.Authentication + AzureDevops.Authentication @@ -83,7 +83,7 @@ - + diff --git a/Cli/Test/Data/VstsLogonTests_InteractiveAadLogonWithRevokedCredentials_Success.json b/Cli/Test/Data/AzureDevOpsLogonTests_InteractiveAadLogonWithRevokedCredentials_Success.json similarity index 100% rename from Cli/Test/Data/VstsLogonTests_InteractiveAadLogonWithRevokedCredentials_Success.json rename to Cli/Test/Data/AzureDevOpsLogonTests_InteractiveAadLogonWithRevokedCredentials_Success.json diff --git a/Cli/Test/Data/VstsLogonTests_InteractiveAadLogon_Canceled.json b/Cli/Test/Data/AzureDevOpsLogonTests_InteractiveAadLogon_Canceled.json similarity index 100% rename from Cli/Test/Data/VstsLogonTests_InteractiveAadLogon_Canceled.json rename to Cli/Test/Data/AzureDevOpsLogonTests_InteractiveAadLogon_Canceled.json diff --git a/Cli/Test/Data/VstsLogonTests_InteractiveAadLogon_Success.json b/Cli/Test/Data/AzureDevOpsLogonTests_InteractiveAadLogon_Success.json similarity index 100% rename from Cli/Test/Data/VstsLogonTests_InteractiveAadLogon_Success.json rename to Cli/Test/Data/AzureDevOpsLogonTests_InteractiveAadLogon_Success.json diff --git a/Cli/Test/Data/VstsLogonTests_InteractiveMsaLogonWithRevokedCredentials_Success.json b/Cli/Test/Data/AzureDevOpsLogonTests_InteractiveMsaLogonWithRevokedCredentials_Success.json similarity index 100% rename from Cli/Test/Data/VstsLogonTests_InteractiveMsaLogonWithRevokedCredentials_Success.json rename to Cli/Test/Data/AzureDevOpsLogonTests_InteractiveMsaLogonWithRevokedCredentials_Success.json diff --git a/Cli/Test/Data/VstsLogonTests_InteractiveMsaLogon_Canceled.json b/Cli/Test/Data/AzureDevOpsLogonTests_InteractiveMsaLogon_Canceled.json similarity index 100% rename from Cli/Test/Data/VstsLogonTests_InteractiveMsaLogon_Canceled.json rename to Cli/Test/Data/AzureDevOpsLogonTests_InteractiveMsaLogon_Canceled.json diff --git a/Cli/Test/Data/VstsLogonTests_InteractiveMsaLogon_Success.json b/Cli/Test/Data/AzureDevOpsLogonTests_InteractiveMsaLogon_Success.json similarity index 100% rename from Cli/Test/Data/VstsLogonTests_InteractiveMsaLogon_Success.json rename to Cli/Test/Data/AzureDevOpsLogonTests_InteractiveMsaLogon_Success.json diff --git a/Cli/Test/Data/VstsLogonTests_NoninteractiveAadLogon_Success.json b/Cli/Test/Data/AzureDevOpsLogonTests_NoninteractiveAadLogon_Success.json similarity index 100% rename from Cli/Test/Data/VstsLogonTests_NoninteractiveAadLogon_Success.json rename to Cli/Test/Data/AzureDevOpsLogonTests_NoninteractiveAadLogon_Success.json diff --git a/Cli/Test/Data/VstsLogonTests_NoninteractiveAadWithRevokedCredentials_Success.json b/Cli/Test/Data/AzureDevOpsLogonTests_NoninteractiveAadWithRevokedCredentials_Success.json similarity index 100% rename from Cli/Test/Data/VstsLogonTests_NoninteractiveAadWithRevokedCredentials_Success.json rename to Cli/Test/Data/AzureDevOpsLogonTests_NoninteractiveAadWithRevokedCredentials_Success.json diff --git a/Cli/Test/ProgramTests.cs b/Cli/Test/ProgramTests.cs index 18beda397..d76616ef6 100644 --- a/Cli/Test/ProgramTests.cs +++ b/Cli/Test/ProgramTests.cs @@ -29,9 +29,8 @@ using Microsoft.Alm.Authentication; using Moq; using Xunit; - +using Azure = AzureDevOps.Authentication; using Git = Microsoft.Alm.Authentication.Git; -using Vsts = VisualStudioTeamServices.Authentication; namespace Microsoft.Alm.Cli.Test { @@ -97,7 +96,7 @@ public async Task LoadOperationArgumentsTest() .Returns(targetUri); opargsMock.SetupProperty(o => o.UseHttpPath); opargsMock.SetupProperty(o => o.ValidateCredentials); - opargsMock.SetupProperty(o => o.VstsTokenScope); + opargsMock.SetupProperty(o => o.DevOpsTokenScope); var opargs = opargsMock.Object; @@ -107,10 +106,10 @@ public async Task LoadOperationArgumentsTest() Assert.True(opargs.ValidateCredentials, "credential.validate"); Assert.True(opargs.UseHttpPath, "credential.useHttpPath"); - Assert.NotNull(opargs.VstsTokenScope); + Assert.NotNull(opargs.DevOpsTokenScope); - var expectedScope = Vsts.TokenScope.BuildAccess | Vsts.TokenScope.CodeWrite; - Assert.Equal(expectedScope, opargs.VstsTokenScope); + var expectedScope = Azure.TokenScope.BuildAccess | Azure.TokenScope.CodeWrite; + Assert.Equal(expectedScope, opargs.DevOpsTokenScope); } public static object[][] TryReadBooleanData diff --git a/Docs/Askpass.md b/Docs/Askpass.md index ed507756b..62c575181 100644 --- a/Docs/Askpass.md +++ b/Docs/Askpass.md @@ -1,7 +1,7 @@ # Git Askpass for Windows [Git Askpass for Windows](https://github.com/Microsoft/Git-Credential-Manager-for-Windows) (Askpass) provides secure Git credential storage for Windows. -Askpass provides multi-factor authentication support for [Visual Studio Team Services](https://www.visualstudio.com/), [Team Foundation Server](https://www.visualstudio.com/en-us/products/tfs-overview-vs.aspx), and [GitHub](https://github.com/). +Askpass provides multi-factor authentication support for [Azure DevOps](https://dev.azure.com/), [Team Foundation Server](https://www.visualstudio.com/en-us/products/tfs-overview-vs.aspx), and [GitHub](https://github.com/). ## Usage diff --git a/Docs/Automation.md b/Docs/Automation.md index 2daa6ee97..43041f8f2 100644 --- a/Docs/Automation.md +++ b/Docs/Automation.md @@ -5,12 +5,12 @@ While there is detailed documentation on [GCM configuration options](Configurati _Note:_ SSH is often a better choice for automated system because requiring interactivity is a non-default option, and SSH is known to be secure and reliable. -## Recommendations for VSTS Build Services +## Recommendations for Azure DevOps Build Services The majority of build definitions will work with a single repository, or at least a set of repositories which all have the same authentication requirements. -In this case, it is generally better to rely on [VSTS Build Variables](https://docs.microsoft.com/en-us/vsts/build-release/concepts/definitions/build/variables?tabs=batch); specifically the `$(System.AccessToken)` build process OAuth token. +In this case, it is generally better to rely on [Azure DevOps Build Variables](https://docs.microsoft.com/en-us/vsts/build-release/concepts/definitions/build/variables?tabs=batch); specifically the `$(System.AccessToken)` build process OAuth token. To enable scripts to use the build process OAuth token, go to the Options tab of the build definition and select 'Allow Scripts to Access OAuth Token'. -For more information, read [VSTS: Use the OAuth token to access the REST API](https://docs.microsoft.com/en-us/vsts/build-release/actions/scripts/powershell#oauth). +For more information, read [Azure DevOps: Use the OAuth token to access the REST API](https://docs.microsoft.com/en-us/vsts/build-release/actions/scripts/powershell#oauth). ## Recommendations for Other Build Services @@ -22,7 +22,7 @@ git config --global credential.interactive never Build agents often need to minimize the amount of network traffic they generate. -To avoid Microsoft Account vs. Azure Active Directory look-up against a Visual Studio Team Services \[VSTS\] account use... +To avoid Microsoft Account vs. Azure Active Directory look-up against an Azure DevOps account use... ... for Azure Directory backed authentication: diff --git a/Docs/Configuration.md b/Docs/Configuration.md index c350f3c7a..dfcea155f 100644 --- a/Docs/Configuration.md +++ b/Docs/Configuration.md @@ -113,7 +113,7 @@ See [GCM_PRESERVE](Environment.md#gcm_preserve) ### tokenDuration -Sets a duration, in hours, limit for the validity of Personal Access Tokens requested from Visual Studio Team Services [VSTS]. +Sets a duration, in hours, limit for the validity of Personal Access Tokens requested from Azure DevOps. If the value is greater than the maximum duration set for the account, the account value supersedes. The value cannot be less than a one hour (1). @@ -169,10 +169,10 @@ See [GCM_VALIDATE](Environment.md#gcm_validate) ### vstsScope -Overrides GCM default scope request when generating a Personal Access Token from Visual Studio Team Services [VSTS]. +Overrides GCM default scope request when generating a Personal Access Token from Azure DevOps. The supported format is one or more [scope values](https://docs.microsoft.com/en-us/vsts/integrate/get-started/authentication/oauth#scopes) separated by whitespace, commas, semi-colons, or pipe `'|'` characters. -Defaults to `vso.code_write|vso.packaging`; Honored when host is 'visualstudio.com'. +Defaults to `vso.code_write|vso.packaging`; Honored when host is 'dev.azure.com'. ```shell git config --global credential.microsoft.visualstudio.com.vstsScope vso.code_write|vso.packaging_write|vso.test_write diff --git a/Docs/CredentialManager.md b/Docs/CredentialManager.md index 736294eb0..0221b2a44 100644 --- a/Docs/CredentialManager.md +++ b/Docs/CredentialManager.md @@ -1,7 +1,7 @@ # Git Credential Manager for Windows The [Git Credential Manager for Windows](https://github.com/Microsoft/Git-Credential-Manager-for-Windows) (GCM) provides secure Git credential storage for Windows. -GCM provides multi-factor authentication support for [Visual Studio Team Services](https://www.visualstudio.com/), [Team Foundation Server](https://www.visualstudio.com/en-us/products/tfs-overview-vs.aspx), [GitHub](https://github.com/), and [BitBucket](https://bitbucket.org). +GCM provides multi-factor authentication support for [Azure DevOps](https://dev.azure.com/), [Team Foundation Server](https://www.visualstudio.com/en-us/products/tfs-overview-vs.aspx), [GitHub](https://github.com/), and [BitBucket](https://bitbucket.org). ## Usage diff --git a/Docs/Environment.md b/Docs/Environment.md index 64694bfb6..30ecba8ea 100644 --- a/Docs/Environment.md +++ b/Docs/Environment.md @@ -97,7 +97,7 @@ See [credential.preserve](Configuration.md#preserve). ### GCM_TOKEN_DURATION -Sets a duration, in hours, limit for the validity of Personal Access Tokens requested from Visual Studio Team Services [VSTS]. +Sets a duration, in hours, limit for the validity of Personal Access Tokens requested from Azure DevOps. If the value is greater than the maximum duration set for the account, the account value supersedes. The value cannot be less than a one hour (1). @@ -137,7 +137,7 @@ See [credential.validate](Configuration.md#validate). ### GCM_VSTS_SCOPE -Overrides GCM default scope request when generating a Personal Access Token from Visual Studio Team Services [VSTS]. +Overrides GCM default scope request when generating a Personal Access Token from Azure DevOps. The supported format is one or more [scope values](https://docs.microsoft.com/en-us/vsts/integrate/get-started/authentication/oauth#scopes) separated by whitespace, commas, semi-colons, or pipe characters (`' '`, `','`, `';'`, `'|'`). Defaults to `vso.code_write|vso.packaging`; Honored when host is 'visualstudio.com'. diff --git a/Docs/Faq.md b/Docs/Faq.md index 4a20dd93c..b1404cf7d 100644 --- a/Docs/Faq.md +++ b/Docs/Faq.md @@ -39,7 +39,7 @@ If you're looking to extend the GCM, or need a way to authenticate with VSTS but The Git Credential Manager does not work on Windows XP, Max OS, or Linux because we had to scope our work and we decided to support the same operating systems that Visual Studio support. Why Visual Studio? -Well, because it is our favorite IDE and in order to support [Visual Studio Team Services](https://www.visualstudio.com/en-us/products/visual-studio-team-services-vs.aspx) we had to use the [Azure Directory Authentication Libraries](https://github.com/AzureAD) which only have multi-factor interactive logon support in their .NET libraries. +Well, because it is our favorite IDE and in order to support [Azure DevOps](https://www.visualstudio.com/en-us/products/visual-studio-team-services-vs.aspx) we had to use the [Azure Directory Authentication Libraries](https://github.com/AzureAD) which only have multi-factor interactive logon support in their .NET libraries. Using .NET means using Visual Studio (which we love anyways) and using Visual Studio means Windows 7 or newer. ## Q: Will there ever be support for Windows XP, Mac OS, or Linux? @@ -94,11 +94,11 @@ This works in v1.8.3.0 of SourceTree. Check that you are using the HTTP(S) URL instead of the SSH URL for your repository. You can do this by running `git remote show origin`. The Fetch URL and Push URL should start with `https://` or `http://`. -If this is not the case, look for the HTTP(S) URL in the web interface of VSTS, TFS, GitHub or Bitbucket, and then run `git remote set-url origin `, where `` is the HTTP(S) URL. +If this is not the case, look for the HTTP(S) URL in the web interface of Azure DevOps, TFS, GitHub or Bitbucket, and then run `git remote set-url origin `, where `` is the HTTP(S) URL. -## Q: Why is git.exe failing to authenticate after linking/unlinking your Visual Studio Team Services account from Azure Active Directory? +## Q: Why is git.exe failing to authenticate after linking/unlinking your Azure DevOps account from Azure Active Directory? -When the tenant backing the Visual Studio Team Services (VSTS) account changes like when you [Connect VSTS account to Azure Active Directory (Azure AD)](https://docs.microsoft.com/en-us/vsts/accounts/connect-account-to-aad), the tenant cache needs to be cleared if you're using a GCM version prior to v1.15.0. +When the tenant backing the Azure DevOps account changes like when you [Connect VSTS account to Azure Active Directory (Azure AD)](https://docs.microsoft.com/en-us/vsts/accounts/connect-account-to-aad), the tenant cache needs to be cleared if you're using a GCM version prior to v1.15.0. Clearing the tenant cache is as easy as deleting the *%LocalAppData%\GitCredentialManager\tenant.cache* file on each machine returning a login error like below. The GCM will automatically recreate and populate the cache file as needed on subsequent login attempts. diff --git a/Docs/Index.md b/Docs/Index.md index dd7043c6f..bdde5416e 100644 --- a/Docs/Index.md +++ b/Docs/Index.md @@ -1,15 +1,15 @@ # Git Credential Manager for Windows The [Git Credential Manager for Windows](https://github.com/Microsoft/Git-Credential-Manager-for-Windows) (GCM) provides secure Git credential storage for Windows. -GCM provides multi-factor authentication support for [Visual Studio Team Services](https://www.visualstudio.com/), [Team Foundation Server](Faq.md#q-i-thought-microsoft-was-maintaining-this-why-does-the-gcm-not-work-as-expected-with-tfs), and [GitHub](https://github.com/). +GCM provides multi-factor authentication support for [Azure DevOps](https://dev.azure.com/), [Team Foundation Server](Faq.md#q-i-thought-microsoft-was-maintaining-this-why-does-the-gcm-not-work-as-expected-with-tfs), and [GitHub](https://github.com/). This project includes: * Secure password storage in the Windows Credential Store -* Multi-factor authentication support for Visual Studio Team Services +* Multi-factor authentication support for Azure DevOps * Two-factor authentication support for GitHub -* Personal Access Token generation and usage support for Visual Studio Team Services and GitHub -* Non-interactive mode support for Visual Studio Team Services backed by Azure Directory +* Personal Access Token generation and usage support for Azure DevOps, GitHub, and Bitbucket +* Non-interactive mode support for Azure DevOps backed by Azure Directory * Kerberos authentication for Team Foundation Server ([see notes](#q-i-thought-microsoft-was-maintaining-this-why-does-the-gcm-not-work-as-expected-with-tfs)) * Optional settings for build agent optimization @@ -28,7 +28,7 @@ GCM cannot prompt you for credentials, at the console, in a MinTTY setup. You don't. It [magically](https://github.com/Microsoft/Git-Credential-Manager-for-Windows/issues/31) works when credentials are needed. -For example, when pushing to [Visual Studio Team Services](https://www.visualstudio.com), it automatically opens a window and initializes an oauth2 flow to get your token. +For example, when pushing to [Azure DevOps](https://dev.azure.com), it automatically opens a window and initializes an oauth2 flow to get your token. ### Manual Installation diff --git a/GcmParentWindowTest/MainWindow.xaml b/GcmParentWindowTest/MainWindow.xaml index 57bfbb266..478e3230f 100644 --- a/GcmParentWindowTest/MainWindow.xaml +++ b/GcmParentWindowTest/MainWindow.xaml @@ -37,7 +37,7 @@