Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions src/shared/Core/GenericHostProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,8 @@ public override async Task<ICredential> GenerateCredentialAsync(InputArguments i

Uri uri = input.GetRemoteUri();

// Determine the if the host supports Windows Integration Authentication (WIA) or OAuth
if (!StringComparer.OrdinalIgnoreCase.Equals(uri.Scheme, "http") &&
Copy link
Author

@pl4nty pl4nty Jun 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naive approach of just removing the guard, but we could check each endpoint instead (including DeviceCode if present?). They should be relative with HTTP(S) host, or absolute HTTP(S)

!StringComparer.OrdinalIgnoreCase.Equals(uri.Scheme, "https"))
{
// Cannot check WIA or OAuth support for non-HTTP based protocols
}
// Check for an OAuth configuration for this remote
else if (GenericOAuthConfig.TryGet(Context.Trace, Context.Settings, input, out GenericOAuthConfig oauthConfig))
if (GenericOAuthConfig.TryGet(Context.Trace, Context.Settings, input, out GenericOAuthConfig oauthConfig))
{
Context.Trace.WriteLine($"Found generic OAuth configuration for '{uri}':");
Context.Trace.WriteLine($"\tAuthzEndpoint = {oauthConfig.Endpoints.AuthorizationEndpoint}");
Expand Down