Skip to content

TypeScript API / @laikacms/bitbucket/storage-bb / BitbucketAuth

Interface: BitbucketAuth ​

Authentication for the Bitbucket Cloud REST API.

Properties ​

appPassword? ​

ts
readonly optional appPassword?: object;

App-password tuple. Sent as HTTP Basic.

password ​

ts
readonly password: string;

username ​

ts
readonly username: string;

headers? ​

ts
readonly optional headers?: Readonly<Record<string, string>>;

Extra headers merged into every request.


oauthToken? ​

ts
readonly optional oauthToken?: string;

OAuth2 access token. Sent as Bearer.


tokenProvider? ​

ts
readonly optional tokenProvider?: () => string | Promise<string>;

Async OAuth2 token provider — called before every request so refreshes are transparent.

Returns ​

string | Promise<string>

Released under the MIT License.