1
0
Fork 0

Bitbucket: when OAuth consumer authentication fails mention that the `This is a private consumer` needs to be enabled (#10678)

pull/10681/head
Stephan 2022-03-31 12:29:19 +01:00 committed by GitHub
parent 12b2c2c3a4
commit 147c6a2f7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -112,9 +112,10 @@ class Bitbucket
} catch (TransportException $e) { } catch (TransportException $e) {
if ($e->getCode() === 400) { if ($e->getCode() === 400) {
$this->io->writeError('<error>Invalid OAuth consumer provided.</error>'); $this->io->writeError('<error>Invalid OAuth consumer provided.</error>');
$this->io->writeError('This can have two reasons:'); $this->io->writeError('This can have three reasons:');
$this->io->writeError('1. You are authenticating with a bitbucket username/password combination'); $this->io->writeError('1. You are authenticating with a bitbucket username/password combination');
$this->io->writeError('2. You are using an OAuth consumer, but didn\'t configure a (dummy) callback url'); $this->io->writeError('2. You are using an OAuth consumer, but didn\'t configure a (dummy) callback url');
$this->io->writeError('3. You are using an OAuth consumer, but didn\'t configure it as private consumer');
return false; return false;
} }

View File

@ -197,9 +197,10 @@ class BitbucketTest extends TestCase
->method('writeError') ->method('writeError')
->withConsecutive( ->withConsecutive(
array('<error>Invalid OAuth consumer provided.</error>'), array('<error>Invalid OAuth consumer provided.</error>'),
array('This can have two reasons:'), array('This can have three reasons:'),
array('1. You are authenticating with a bitbucket username/password combination'), array('1. You are authenticating with a bitbucket username/password combination'),
array('2. You are using an OAuth consumer, but didn\'t configure a (dummy) callback url') array('2. You are using an OAuth consumer, but didn\'t configure a (dummy) callback url'),
array('3. You are using an OAuth consumer, but didn\'t configure it as private consumer')
); );
$this->httpDownloader->expects($this->once()) $this->httpDownloader->expects($this->once())