Composer API
Class

Composer\Util\Bitbucket

class Bitbucket

Constants

OAUTH2_ACCESS_TOKEN_URL

Methods

__construct(IOInterface $io, Config $config, ProcessExecutor $process = null, RemoteFilesystem $remoteFilesystem = null, int $time = null)

Constructor.

string getToken()

bool authorizeOAuth(string $originUrl)

Attempts to authorize a Bitbucket domain via OAuth

bool authorizeOAuthInteractively(string $originUrl, string $message = null)

Authorizes a Bitbucket domain interactively via OAuth

string requestToken(string $originUrl, string $consumerKey, string $consumerSecret)

Retrieves an access token from Bitbucket.

Details

at line 43
public __construct(IOInterface $io, Config $config, ProcessExecutor $process = null, RemoteFilesystem $remoteFilesystem = null, int $time = null)

Constructor.

Parameters

IOInterface $io The IO instance
Config $config The composer configuration
ProcessExecutor $process Process instance, injectable for mocking
RemoteFilesystem $remoteFilesystem Remote Filesystem, injectable for mocking
int $time Timestamp, injectable for mocking

at line 55
public string getToken()

Return Value

string

at line 70
public bool authorizeOAuth(string $originUrl)

Attempts to authorize a Bitbucket domain via OAuth

Parameters

string $originUrl The host this Bitbucket instance is located at

Return Value

bool true on success

at line 132
public bool authorizeOAuthInteractively(string $originUrl, string $message = null)

Authorizes a Bitbucket domain interactively via OAuth

Parameters

string $originUrl The host this Bitbucket instance is located at
string $message The reason this authorization is required

Return Value

bool true on success

Exceptions

RuntimeException
Exception

at line 186
public string requestToken(string $originUrl, string $consumerKey, string $consumerSecret)

Retrieves an access token from Bitbucket.

Parameters

string $originUrl
string $consumerKey
string $consumerSecret

Return Value

string