From 67d304e3e896c496ef2662dc22b470cdb74e2d07 Mon Sep 17 00:00:00 2001 From: patrickniyogitare28 Date: Wed, 27 Apr 2022 09:55:03 +0200 Subject: [PATCH] chore(guid): added bitbucket documentation --- .env.example | 3 +- README.md | 6 ++++ docs/guides/BITBUCKET-README.md | 49 +++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 docs/guides/BITBUCKET-README.md diff --git a/.env.example b/.env.example index cfa7362..1be0a88 100644 --- a/.env.example +++ b/.env.example @@ -11,5 +11,6 @@ GITHUB_API= https://api.github.com GITHUB_PERSONAL_ACCESS_TOKEN= BITBUCKET_API=https://bitbucket.org/!api/2.0 -BITBUCKET_ACCESS_TOKEN= +BITBUCKET_CLIENT_ID= +BITBUCKET_SECRET= BITBUCKET_AUTH_TOKEN= \ No newline at end of file diff --git a/README.md b/README.md index 484578a..f5908b7 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,12 @@ GITHUB_CLIENT_ID GITHUB_CLIENT_SECRET Use the [this documentation guid](https://github.com/knowbee/stackoverflow-auth-microservice/blob/master/docs/guides/GITHUB-APP-README.md) to be able to create a github application and have the API credentials to use in the app + +## Getting started with Bitbucket API + +To access the bitbucket api. A bit bucket application credentials are required. +Follow the guid on [here]() to create bitbucket app and generate a bitbucket credentials + ## Getting started `git clone https://github.com/knowbee/stackoverflow-auth-microservice.git` diff --git a/docs/guides/BITBUCKET-README.md b/docs/guides/BITBUCKET-README.md new file mode 100644 index 0000000..c17325c --- /dev/null +++ b/docs/guides/BITBUCKET-README.md @@ -0,0 +1,49 @@ +# Getting started with Bitbucket app + +Technical documentation on how to get started with bitbucket API + +## Getting a bitbucket **Auth token** + +To get the bitbucket **Auth token** you need to have [an Atlassian](https://atlassian.com) account. click [here](https://id.atlassian.com/login?continue=https%3A%2F%2Fdeveloper.atlassian.com%2F%2Fcloud%2Fbitbucket%2F) to login or create your account. + + +To get the **Auth Token** open [this link](https://id.atlassian.com/manage-profile/security/api-tokens). + +On successfully creating the Auth token copy it and past it under `.env` on env variable **BITBUCKET_AUTH_TOKEN** + + +![bitbucket auth token](https://github.com/knowbee/stackoverflow-auth-microservice/blob/master/docs/assets/bitbucke-auth-token.png?raw=true) + + + +## Creating a bitbucket oAuth 2.0 App for authentication integration + +To create a bitbucket oAuth 2.0 app just visit [this link](https://developer.atlassian.com/console/myapps/) to get started + +Click the **Create** button to get started, from the drop down select **oAuth 2.0 integration** + + +### Create an app + +To create an app : + +1. [Add the app name and check the check box to agree to terms](https://developer.atlassian.com/console/myapps/create-3lo-app/) + +2. Click create button to confirm + +3. Click Create app password. + +![demo app](https://github.com/knowbee/stackoverflow-auth-microservice/blob/master/docs/assets/0auth2.0-app.png?raw=true) + + +Next you open the **App details** section and scroll down to copy the app **client ID** and **secret** + +Past the two values to their corresponding environment variables under `.env` + +``` + BITBUCKET_CLIENT_ID= + BITBUCKET_SECRET= +``` + + +