Path: blob/master/src/applications/auth/provider/PhabricatorAmazonAuthProvider.php
12256 views
<?php12final class PhabricatorAmazonAuthProvider3extends PhabricatorOAuth2AuthProvider {45public function getProviderName() {6return pht('Amazon');7}89protected function getProviderConfigurationHelp() {10$login_uri = PhabricatorEnv::getURI($this->getLoginURI());1112$uri = new PhutilURI(PhabricatorEnv::getProductionURI('/'));13$https_note = null;14if ($uri->getProtocol() !== 'https') {15$https_note = pht(16'NOTE: Amazon **requires** HTTPS, but this service does '.17'not use HTTPS. **You will not be able to add Amazon as an '.18'authentication provider until you configure HTTPS on this install**.');19}2021return pht(22"%s\n\n".23"To configure Amazon OAuth, create a new 'API Project' here:".24"\n\n".25"http://login.amazon.com/manageApps".26"\n\n".27"Use these settings:".28"\n\n".29" - **Allowed Return URLs:** Add this: `%s`".30"\n\n".31"After completing configuration, copy the **Client ID** and ".32"**Client Secret** to the fields above.",33$https_note,34$login_uri);35}3637protected function newOAuthAdapter() {38return new PhutilAmazonAuthAdapter();39}4041protected function getLoginIcon() {42return 'Amazon';43}4445}464748