Authenticating Bitbucket Cloud Access using OAuth
Last updated
Last updated
To gain access to your BitBucket cloud-based projects, you may choose to use OAuth to authorize iCR to access them. Here is how that is done.
To set this up, login into Bitbucket and click on your login icon to view your user workspaces.
This will display a list of all your curent workspaces. Select the one that you wish to authortize for use with iCR.
Once the workspace is selected, a menu of options is shown on the left side of the window. Use this to get to the OAuth consumers window. That menu is long, so scroll down to make sure that you see all the options. Once you find it, click on OAuth consumers to open the OAuth registration window for this workspcae.
The “OAuth consumers” page is where you tell Bitbucket to allow your Server to allow logins redirected from the iCR server.
Click on “Add Consumer” to add a new OAuth consumer for iCR. This brings up the Add OAuth consumer page.
For the consumer “Name” use whatever you like. “iCR for BitBucket” has been used in this example. You may also want to add a brief Description to remind you what this OAuth is being used for.
You also must enter the Callback URL to the iCR server. Bitbucket’s OAuth uses that to verify the authorization handshake. The Callback URL will need to use the URL of your host system and must also specify the particular port number used to access the iCR Navigator. The default port number is 3001 although that could be changed by your system administrator so check with them if something other than the default port is being used. For these examples, we will use the default value of 3001.
NOTE: If a URL has not been generated for your iCR server, you may substitute the IP address of the server.
In this example, we will use the sample URL:
So, the complete Callback URL would look like this:
You also need to select both the Account: Read and the Pull requests: Write options. Then, select Save to complete the consumer authorization.
Click on the newly added consumer to display its items to be copied.
As was noted in Authenticating GitHub Cloud Access using OAuth, once you have completed this step, you will need to copy the Key and the Secret. From here, the process is the same as outlined for GitHub Cloud.