Skip to content

Commit

Permalink
recognise BitBucket hosts by WWW-Authenticate header
Browse files Browse the repository at this point in the history
  • Loading branch information
hickford committed Oct 19, 2023
1 parent d0ae441 commit 8b7748d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using Atlassian.Bitbucket.Cloud;
Expand Down Expand Up @@ -43,6 +44,11 @@ public bool IsSupported(InputArguments input)
return false;
}

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

// Split port number and hostname from host input argument
if (!input.TryGetHostAndPort(out string hostName, out _))
{
Expand Down

0 comments on commit 8b7748d

Please sign in to comment.