Creates a new Security instance with Basic Authentication credentials.
The base URL of the Bitbucket Data Center instance (e.g., https://bitbucket.example.com).
Must be a valid URL; throws if it cannot be parsed.
The username to authenticate with
The personal access token or password to authenticate with
Returns the base URL of the Bitbucket Data Center instance, without a trailing slash.
The API base URL
Returns the value of the Authorization header for Basic Authentication.
The Authorization header value in the format Basic <base64-encoded-credentials>
Returns the full set of HTTP headers required for authenticated API requests.
An object containing Authorization, Content-Type, and Accept headers
Handles Basic Authentication for Bitbucket Data Center REST API requests.
Example