-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a OAuth2 backend for Bitbucket
- Loading branch information
1 parent
0a4b744
commit 84f001a
Showing
4 changed files
with
184 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,37 @@ | ||
Bitbucket | ||
========= | ||
|
||
Bitbucket works similar to Twitter OAuth. | ||
Bitbucket supports both OAuth2 and OAuth1 logins. | ||
|
||
- Register a new application by emailing ``support@bitbucket.org`` with an | ||
application name and a bit of a description, | ||
1. Register a new OAuth Consumer by following the instructions in the | ||
Bitbucket documentation: `OAuth on Bitbucket`_ | ||
|
||
Note: For OAuth2, your consumer MUST have the "account" scope otherwise | ||
the user profile information (username, name, etc.) won't be accessible. | ||
|
||
2. Configure the appropriate settings for OAuth2 or OAuth1 (see below). | ||
|
||
OAuth2 | ||
------ | ||
|
||
- Fill ``Consumer Key`` and ``Consumer Secret`` values in the settings:: | ||
|
||
SOCIAL_AUTH_BITBUCKET_KEY = '' | ||
SOCIAL_AUTH_BITBUCKET_SECRET = '' | ||
SOCIAL_AUTH_BITBUCKET_OAUTH2_KEY = '<your-consumer-key>' | ||
SOCIAL_AUTH_BITBUCKET_OAUTH2_SECRET = '<your-consumer-secret>' | ||
|
||
- If you would like to restrict access to only users with verified e-mail | ||
addresses, set ``SOCIAL_AUTH_BITBUCKET_OAUTH2_VERIFIED_EMAILS_ONLY = True`` | ||
|
||
OAuth1 | ||
------ | ||
|
||
Settings | ||
-------- | ||
- OAuth1 works similarly to OAuth2, but you must fill in the following settings | ||
instead:: | ||
|
||
Sometimes Bitbucket users don't have a verified email address, making it | ||
impossible to get the basic user information to continue the auth process. | ||
It's possible to avoid these users with this setting:: | ||
SOCIAL_AUTH_BITBUCKET_KEY = '<your-consumer-key>' | ||
SOCIAL_AUTH_BITBUCKET_SECRET = '<your-consumer-secret>' | ||
|
||
SOCIAL_AUTH_BITBUCKET_VERIFIED_EMAILS_ONLY = True | ||
- If you would like to restrict access to only users with verified e-mail | ||
addresses, set ``SOCIAL_AUTH_BITBUCKET_VERIFIED_EMAILS_ONLY = True`` | ||
|
||
By default the setting is set to ``False`` since it's possible for a project to | ||
gather this information by other methods. | ||
.. _OAuth on Bitbucket: https://confluence.atlassian.com/display/BITBUCKET/OAuth+on+Bitbucket |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters