Bitbucket
in package
Tags
Table of Contents
- OAUTH2_ACCESS_TOKEN_URL = 'https://bitbucket.org/site/oauth2/access_token'
- $config : mixed
- $io : mixed
- $process : mixed
- $remoteFilesystem : mixed
- $time : mixed
- $token : mixed
- __construct() : mixed
- Constructor.
- authorizeOAuth() : bool
- Attempts to authorize a Bitbucket domain via OAuth
- authorizeOAuthInteractively() : bool
- Authorizes a Bitbucket domain interactively via OAuth
- getToken() : string
- requestToken() : string
- Retrieves an access token from Bitbucket.
- getTokenFromConfig() : bool
- requestAccessToken() : bool
- storeInAuthConfig() : mixed
- Store the new/updated credentials to the configuration
Constants
OAUTH2_ACCESS_TOKEN_URL
public
mixed
OAUTH2_ACCESS_TOKEN_URL
= 'https://bitbucket.org/site/oauth2/access_token'
Properties
$config
private
mixed
$config
$io
private
mixed
$io
$process
private
mixed
$process
$remoteFilesystem
private
mixed
$remoteFilesystem
$time
private
mixed
$time
$token
private
mixed
$token
= array()
Methods
__construct()
Constructor.
public
__construct(IOInterface $io, Config $config[, ProcessExecutor $process = null ][, RemoteFilesystem $remoteFilesystem = null ][, int $time = null ]) : mixed
Parameters
- $io : IOInterface
-
The IO instance
- $config : Config
-
The composer configuration
- $process : ProcessExecutor = null
-
Process instance, injectable for mocking
- $remoteFilesystem : RemoteFilesystem = null
-
Remote Filesystem, injectable for mocking
- $time : int = null
-
Timestamp, injectable for mocking
Return values
mixed —authorizeOAuth()
Attempts to authorize a Bitbucket domain via OAuth
public
authorizeOAuth(string $originUrl) : bool
Parameters
- $originUrl : string
-
The host this Bitbucket instance is located at
Return values
bool —true on success
authorizeOAuthInteractively()
Authorizes a Bitbucket domain interactively via OAuth
public
authorizeOAuthInteractively(string $originUrl[, string $message = null ]) : bool
Parameters
- $originUrl : string
-
The host this Bitbucket instance is located at
- $message : string = null
-
The reason this authorization is required
Tags
Return values
bool —true on success
getToken()
public
getToken() : string
Return values
string —requestToken()
Retrieves an access token from Bitbucket.
public
requestToken(string $originUrl, string $consumerKey, string $consumerSecret) : string
Parameters
- $originUrl : string
- $consumerKey : string
- $consumerSecret : string
Return values
string —getTokenFromConfig()
private
getTokenFromConfig(string $originUrl) : bool
Parameters
- $originUrl : string
Return values
bool —requestAccessToken()
private
requestAccessToken(string $originUrl) : bool
Parameters
- $originUrl : string
Return values
bool —storeInAuthConfig()
Store the new/updated credentials to the configuration
private
storeInAuthConfig(string $originUrl, string $consumerKey, string $consumerSecret) : mixed
Parameters
- $originUrl : string
- $consumerKey : string
- $consumerSecret : string