Skip to content

Commit ea507e5

Browse files
committed
Updated Api::setCredentials to use the new BasicAuthListener (+BC)
1 parent dcae03b commit ea507e5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/Bitbucket/API/Api.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,13 @@ public function setClient(ClientInterface $client)
9595
*/
9696
public function setCredentials(Authentication\AuthenticationInterface $auth)
9797
{
98+
// keep BC
99+
if ($auth instanceof Authentication\Basic) {
100+
$this->getClient()->addListener(
101+
new Http\Listener\BasicAuthListener($auth->getUsername(), $auth->getPassword())
102+
);
103+
}
104+
98105
$this->auth = $auth;
99106
}
100107

0 commit comments

Comments
 (0)