Page MenuHomePhabricator

D9762.diff
No OneTemporary

D9762.diff

diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -1277,6 +1277,7 @@
'PhabricatorAuthProviderLDAP' => 'applications/auth/provider/PhabricatorAuthProviderLDAP.php',
'PhabricatorAuthProviderOAuth' => 'applications/auth/provider/PhabricatorAuthProviderOAuth.php',
'PhabricatorAuthProviderOAuth1' => 'applications/auth/provider/PhabricatorAuthProviderOAuth1.php',
+ 'PhabricatorAuthProviderOAuth1Bitbucket' => 'applications/auth/provider/PhabricatorAuthProviderOAuth1Bitbucket.php',
'PhabricatorAuthProviderOAuth1JIRA' => 'applications/auth/provider/PhabricatorAuthProviderOAuth1JIRA.php',
'PhabricatorAuthProviderOAuth1Twitter' => 'applications/auth/provider/PhabricatorAuthProviderOAuth1Twitter.php',
'PhabricatorAuthProviderOAuth2' => 'applications/auth/provider/PhabricatorAuthProviderOAuth2.php',
@@ -4073,6 +4074,7 @@
'PhabricatorAuthProviderLDAP' => 'PhabricatorAuthProvider',
'PhabricatorAuthProviderOAuth' => 'PhabricatorAuthProvider',
'PhabricatorAuthProviderOAuth1' => 'PhabricatorAuthProviderOAuth',
+ 'PhabricatorAuthProviderOAuth1Bitbucket' => 'PhabricatorAuthProviderOAuth1',
'PhabricatorAuthProviderOAuth1JIRA' => 'PhabricatorAuthProviderOAuth1',
'PhabricatorAuthProviderOAuth1Twitter' => 'PhabricatorAuthProviderOAuth1',
'PhabricatorAuthProviderOAuth2' => 'PhabricatorAuthProviderOAuth',
diff --git a/src/applications/auth/provider/PhabricatorAuthProviderOAuth1Bitbucket.php b/src/applications/auth/provider/PhabricatorAuthProviderOAuth1Bitbucket.php
new file mode 100644
--- /dev/null
+++ b/src/applications/auth/provider/PhabricatorAuthProviderOAuth1Bitbucket.php
@@ -0,0 +1,27 @@
+<?php
+
+final class PhabricatorAuthProviderOAuth1Bitbucket
+ extends PhabricatorAuthProviderOAuth1 {
+
+ public function getProviderName() {
+ return pht('Bitbucket');
+ }
+
+ public function getProviderConfigurationHelp() {
+ return pht(
+ "To configure Bitbucket OAuth, log in to Bitbucket and go to ".
+ "**Manage Account** > **Access Management** > **OAuth**.\n\n".
+ "Click **Add Consumer** and create a new application.\n\n".
+ "After completing configuration, copy the **Key** and ".
+ "**Secret** to the fields above.");
+ }
+
+ protected function newOAuthAdapter() {
+ return new PhutilAuthAdapterOAuthBitbucket();
+ }
+
+ protected function getLoginIcon() {
+ return 'Bitbucket';
+ }
+
+}

File Metadata

Mime Type
text/plain
Expires
Wed, Apr 2, 12:49 PM (1 d, 4 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7225420
Default Alt Text
D9762.diff (2 KB)

Event Timeline