class Bitbucket (View source)

Constants

OAUTH2_ACCESS_TOKEN_URL

Methods

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

Constructor.

string
getToken()

No description

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

__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

string getToken()

Return Value

string

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

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

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

Retrieves an access token from Bitbucket.

Parameters

string $originUrl
string $consumerKey
string $consumerSecret

Return Value

string