Due to struct size differences, the remote URL capture via command line sniffing failed.
Instead of relying on fixed size and offset value, the p/invoke layer should use the offset and size values which align with the bitness of the process.
Improve the credential key generation for VSTS account credentials. Update the pattern to use {host}/{organization} for the format when the repository is Azure hosted.
Only append the "X-GitHub-OTP" header if there's a value to append with it. Including the header without a value appears cause github.com to emit 2FA SMS messages.
- Restore the create nupkg build target to 'Microsoft.Vsts.Authentication' project.
- Update the 'Microsoft.Alm.Authentication.nuspec' to hard code author, copyright, and owner values.
Group all of the shared projects under the same folder "Shared/", and update all referencing projects.
- Move "Shared/" -> "Shared/Win32/"
- Move "Cli/Shared/" -> "Shared/Cli/".
- Move "Gui-Shared/" -> "Shared/Gui/".
- Update project and solution files.
Add the ability to read the remote name and URL from the parent git-remote-http(s).exe process. The process must a parent of the current process.
Update `TargetUri` to accept a `commandUri` as part of its constructor; enabling the type to carry the URL read from the git-remote-http(s).exe process.
Add new `.CreateWith(...)` methods to `TargetUri` to more easily create new instances with only partial updates.
Actually check the for a host-name match when validting if a URI is a potential VSTS URL.
Additoinally, use the common conversion routine when it can be used instead of local implementations.
As the project has aged, its structure has not held up as well as one would hope over time. This changes the layout of the project to improve compactness, cleanliness, and understadability.
- Move all 'Cli-*' projects under a common 'Cli/' folder.
- Rename 'Cli-CredentialHelper' -> 'Cli/Manager'
- Rename 'Cli-Askpass' -> 'Cli/Askpass'
- Rename 'Cli-CredentialHelper.Test' -> 'Cli/Test'
- Compact library and dependency layouts
- Move 'Bitbucket.Authentication' -> 'Bitbucket.Authentication/Src'
- Move 'Bitbucket.Authentication.Test' -> 'Bitbucket.Authentication/Test'
- Move 'GitHub.Authentication' -> 'GitHub.Authentication/Src'
- Move 'GitHub.Authentication.Test' -> 'GitHub.Authentication/Test'
Updates the project files to adopt to the folder renames.
- Update "Cli-CredentialManager/Cli-CredentialHelper.csproj" -> "Cli-Manager.csproj"
- Update "Cli-CredentialManager.Test/Cli-CredentialManager.Test.csproj" -> "Cli-Manager.Test/Cli-Manager.Test.csproj"
Correctly detect the VSTS authority type.
- Use "HEAD" HTTP/S requests, not "GET".
- Expect a "HTTP401" response, not "HTTP200".
- Handle lists of resource-tenant-identities.
- Find the first non-common tentant-identity, but fallback to common if non-common aren't found.
When code is repeated often, it's likely because it should have been in a common, utility method.
- Create `GetTargetUrl` method to transform `TargetUri` values into Azure happy `string` values.
- Create `IsVstsUrl` method to test for "visualstudio.com" and "azure.com" matches.
Rename a couple of `TargetUri` properties to more consistent.
- `.TargetUriUsername` -> `.UserInfo`
- `.TargetUriContainsUsername` -> `.ContainsUserInfo`
Azure supports a URL format whereas the user-information (when only a username is present) is identical to the first path segment, This enables the GCM to have better handling of validation, PAT acquisition, etc so use it.
To avoid including old Microsoft.Alm.Authentication.*.nupkg files in artifacts, delete any pre-existing *.nupkg files before attempting to build new nupkg files.
- Add 'ProjectName' values to all projects that the "Installer.proj" has a dependency on.
- Delete "Microsoft.Alm.Authentication.nuspec".
- Rename "Microsoft.Alm.Authentication.symbols.nuspec" to "Microsoft.Alm.Authentication.nuspec".
- Update the nupkg dependency to the correct 'Microsoft.IdentityModel.Clients.ActiveDirectory v3.19.4'.
- Add 'Microsoft.Alm.Authentication.{version}.nupkg' to the list of files to be signed.
- Add error checks to "Installer.proj" to ensure that the 'Condition' and 'Platform' properties are correctly set.