Page MenuHomePhabricator

D10297.diff
No OneTemporary

D10297.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
@@ -1206,6 +1206,7 @@
'PhabricatorAuthValidateController' => 'applications/auth/controller/PhabricatorAuthValidateController.php',
'PhabricatorAuthenticationConfigOptions' => 'applications/config/option/PhabricatorAuthenticationConfigOptions.php',
'PhabricatorAutoEventListener' => 'infrastructure/events/PhabricatorAutoEventListener.php',
+ 'PhabricatorAzureAuthProvider' => 'applications/auth/provider/PhabricatorAzureAuthProvider.php',
'PhabricatorBarePageExample' => 'applications/uiexample/examples/PhabricatorBarePageExample.php',
'PhabricatorBarePageView' => 'view/page/PhabricatorBarePageView.php',
'PhabricatorBaseEnglishTranslation' => 'infrastructure/internationalization/translation/PhabricatorBaseEnglishTranslation.php',
@@ -4006,6 +4007,7 @@
'PhabricatorAuthValidateController' => 'PhabricatorAuthController',
'PhabricatorAuthenticationConfigOptions' => 'PhabricatorApplicationConfigOptions',
'PhabricatorAutoEventListener' => 'PhabricatorEventListener',
+ 'PhabricatorAzureAuthProvider' => 'PhabricatorOAuth2AuthProvider',
'PhabricatorBarePageExample' => 'PhabricatorUIExample',
'PhabricatorBarePageView' => 'AphrontPageView',
'PhabricatorBaseEnglishTranslation' => 'PhabricatorTranslation',
diff --git a/src/applications/auth/provider/PhabricatorAzureAuthProvider.php b/src/applications/auth/provider/PhabricatorAzureAuthProvider.php
new file mode 100644
--- /dev/null
+++ b/src/applications/auth/provider/PhabricatorAzureAuthProvider.php
@@ -0,0 +1,37 @@
+<?php
+
+
+final class PhabricatorAzureAuthProvider
+ extends PhabricatorOAuth2AuthProvider {
+
+ public function getProviderName() {
+ return pht('Azure Active Directory');
+ }
+
+ public function getProviderConfigurationHelp() {
+ $login_uri = $this->getLoginURI();
+
+ return pht(
+ "To configure Azure AD OAuth, create a new application here:".
+ "\n\n".
+ "https://manage.windowsazure.com".
+ "\n\n".
+ "When creating your application, use these settings:".
+ "\n\n".
+ " - **Redirect URI:** Set this to: `%s`".
+ "\n\n".
+ "After completing configuration, copy the **Client ID** and ".
+ "**Client Secret** to the fields above. (You may need to generate the ".
+ "client secret by clicking 'Select duration' under 'keys' first.)",
+ $login_uri);
+ }
+
+ protected function newOAuthAdapter() {
+ return new PhutilAzureAuthAdapter();
+ }
+
+ protected function getLoginIcon() {
+ return 'Azure';
+ }
+
+}

File Metadata

Mime Type
text/plain
Expires
Sun, May 12, 3:19 AM (3 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6287894
Default Alt Text
D10297.diff (2 KB)

Event Timeline