APPENDIX C – BITBUCKET OAUTH SETUP
Last updated
Last updated
li {list-style-type: none;}
Section 3.3 Accessing Your Source Code, describes how to create the OAuth credentials needed to access GitHub. This appendix adds the additional details if you are planning on using Bitbucket to access your source code.
Bitbucket also uses the OAuth standard to allow you to tell Bitbucket that your iCR for Java server is allowed to redirect login credentials for Bitbucket to authenticate. To set this up, login into Bitbucket and click on your login icon to drop down your user profile.
From there, select one of your “Recent Workspaces” from the pull-down menu
This opens another menu on the left.
Click on “Settings” to open an expanded menu.
That expanded menu is long, so scroll to the bottom to make sure that you see all the options. You are looking for “APPS AND FEATURES” near the bottom.
Click on “OAuth consumers” to go to the OAuth authorization page.
The “OAuth consumers” page is where you tell Bitbucket to allow your Server to allow logins redirected from the Server.
Click on “Add Consumer” to add a new OAuth consumer for iCR for Python.
For the consumer “Name” use whatever you like. “iCR for Python” has been used in this example. You also must enter the redirect URL to the server. Bitbucket’s OAuth uses that to verify the authorization handshake. Enter the URL as your server’s IP address with port 3002 and the callback text. Using the example IP address from Section 3.3, enter: http://3.237.77.219:3002/login/bitbucket/return
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 for GitHub, 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.