Skip to content

Commit

Permalink
recognise GitLab hosts by WWW-Authenticate header (#1428)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldennington authored Oct 18, 2023
2 parents ac0b264 + f4f3689 commit d0ae441
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/shared/GitLab/GitLabHostProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using GitCredentialManager;
using GitCredentialManager.Authentication.OAuth;
using System.Net.Http.Headers;
using System.Linq;

namespace GitLab
{
Expand Down Expand Up @@ -69,6 +70,11 @@ public override bool IsSupported(InputArguments input)
return true;
}

if (input.WwwAuth.Any(x => x.Contains("realm=\"GitLab\"")))
{
return true;
}

return false;
}

Expand Down

0 comments on commit d0ae441

Please sign in to comment.