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 @@ +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'; + } + +}