Skip to content

Commit fc51bc1

Browse files
committed
recognise BitBucket hosts by WWW-Authenticate header
Tested with https://bitbucket.hl7.org
1 parent d0ae441 commit fc51bc1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/shared/Atlassian.Bitbucket/BitbucketHostProvider.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.Linq;
34
using System.Net.Http;
45
using System.Threading.Tasks;
56
using Atlassian.Bitbucket.Cloud;
@@ -43,6 +44,10 @@ public bool IsSupported(InputArguments input)
4344
return false;
4445
}
4546

47+
if (input.WwwAuth.Any(x => x.Contains("realm=\"Atlassian Bitbucket\"")))
48+
return true;
49+
}
50+
4651
// Split port number and hostname from host input argument
4752
if (!input.TryGetHostAndPort(out string hostName, out _))
4853
{

0 commit comments

Comments
 (0)