Bitbucket: when OAuth consumer authentication fails mention that the `This is a private consumer` needs to be enabled (#10678)
parent
12b2c2c3a4
commit
147c6a2f7e
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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())
|
||||||
|
|
Loading…
Reference in New Issue