@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove the Persona login method

Summary:
Persona is going to be decommed November 30th, 2016.
It is highly unlikely that anyone is currently using persona as a real
login method at this point.

Test Plan: tried locally to add auth adapter.

Reviewers: chad, #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D16371

authored by

Eitan Adler and committed by
epriestley
0ad1dd64 005d8493

+3 -145
+3 -12
resources/celerity/map.php
··· 9 9 'names' => array( 10 10 'conpherence.pkg.css' => '0b64e988', 11 11 'conpherence.pkg.js' => '6249a1cf', 12 - 'core.pkg.css' => '94090cab', 12 + 'core.pkg.css' => '58d21331', 13 13 'core.pkg.js' => 'e4260032', 14 14 'darkconsole.pkg.js' => 'e7393ebb', 15 15 'differential.pkg.css' => 'a4ba74b5', ··· 170 170 'rsrc/css/phui/workboards/phui-workboard.css' => '16441d5e', 171 171 'rsrc/css/phui/workboards/phui-workcard.css' => '0c62d7c5', 172 172 'rsrc/css/phui/workboards/phui-workpanel.css' => '92197373', 173 - 'rsrc/css/sprite-login.css' => '6dbbbd97', 173 + 'rsrc/css/sprite-login.css' => '587d92d7', 174 174 'rsrc/css/sprite-tokens.css' => '9cdfd599', 175 175 'rsrc/css/syntax/syntax-default.css' => '9923583c', 176 176 'rsrc/externals/d3/d3.min.js' => 'a11a5ff2', ··· 373 373 'rsrc/js/application/aphlict/behavior-aphlict-listen.js' => 'fb20ac8d', 374 374 'rsrc/js/application/aphlict/behavior-aphlict-status.js' => '5e2634b9', 375 375 'rsrc/js/application/aphlict/behavior-desktop-notifications-control.js' => 'edd1ba66', 376 - 'rsrc/js/application/auth/behavior-persona-login.js' => '9414ff18', 377 376 'rsrc/js/application/calendar/behavior-day-view.js' => '4b3c4443', 378 377 'rsrc/js/application/calendar/behavior-event-all-day.js' => 'b41537c9', 379 378 'rsrc/js/application/calendar/behavior-month-view.js' => 'fe33e256', ··· 660 659 'javelin-behavior-maniphest-subpriority-editor' => '71237763', 661 660 'javelin-behavior-owners-path-editor' => '7a68dda3', 662 661 'javelin-behavior-passphrase-credential-control' => '3cb0b2fc', 663 - 'javelin-behavior-persona-login' => '9414ff18', 664 662 'javelin-behavior-phabricator-active-nav' => 'e379b58e', 665 663 'javelin-behavior-phabricator-autofocus' => '7319e029', 666 664 'javelin-behavior-phabricator-busy-example' => '60479091', ··· 906 904 'releeph-request-differential-create-dialog' => '8d8b92cd', 907 905 'releeph-request-typeahead-css' => '667a48ae', 908 906 'setup-issue-css' => 'f794cfc3', 909 - 'sprite-login-css' => '6dbbbd97', 907 + 'sprite-login-css' => '587d92d7', 910 908 'sprite-tokens-css' => '9cdfd599', 911 909 'syntax-default-css' => '9923583c', 912 910 'syntax-highlighting-css' => '769d3498', ··· 1665 1663 'javelin-stratcom', 1666 1664 'javelin-workflow', 1667 1665 'javelin-dom', 1668 - ), 1669 - '9414ff18' => array( 1670 - 'javelin-behavior', 1671 - 'javelin-resource', 1672 - 'javelin-stratcom', 1673 - 'javelin-workflow', 1674 - 'javelin-util', 1675 1666 ), 1676 1667 '949c0fe5' => array( 1677 1668 'javelin-install',
resources/sprite/login_1x/Persona.png

This is a binary file and will not be displayed.

resources/sprite/login_2x/Persona.png

This is a binary file and will not be displayed.

-5
resources/sprite/manifest/login.json
··· 81 81 "rule": ".login-PayPal", 82 82 "hash": "dfa09f45369c93bb0fd82a333b0fe927" 83 83 }, 84 - "login-Persona": { 85 - "name": "login-Persona", 86 - "rule": ".login-Persona", 87 - "hash": "14cc5b479b14abe16261c01fc432ffd1" 88 - }, 89 84 "login-Phabricator": { 90 85 "name": "login-Phabricator", 91 86 "rule": ".login-Phabricator",
-2
src/__phutil_library_map__.php
··· 3268 3268 'PhabricatorPeopleUserFunctionDatasource' => 'applications/people/typeahead/PhabricatorPeopleUserFunctionDatasource.php', 3269 3269 'PhabricatorPeopleUserPHIDType' => 'applications/people/phid/PhabricatorPeopleUserPHIDType.php', 3270 3270 'PhabricatorPeopleWelcomeController' => 'applications/people/controller/PhabricatorPeopleWelcomeController.php', 3271 - 'PhabricatorPersonaAuthProvider' => 'applications/auth/provider/PhabricatorPersonaAuthProvider.php', 3272 3271 'PhabricatorPhabricatorAuthProvider' => 'applications/auth/provider/PhabricatorPhabricatorAuthProvider.php', 3273 3272 'PhabricatorPhameApplication' => 'applications/phame/application/PhabricatorPhameApplication.php', 3274 3273 'PhabricatorPhameBlogPHIDType' => 'applications/phame/phid/PhabricatorPhameBlogPHIDType.php', ··· 8326 8325 'PhabricatorPeopleUserFunctionDatasource' => 'PhabricatorTypeaheadCompositeDatasource', 8327 8326 'PhabricatorPeopleUserPHIDType' => 'PhabricatorPHIDType', 8328 8327 'PhabricatorPeopleWelcomeController' => 'PhabricatorPeopleController', 8329 - 'PhabricatorPersonaAuthProvider' => 'PhabricatorAuthProvider', 8330 8328 'PhabricatorPhabricatorAuthProvider' => 'PhabricatorOAuth2AuthProvider', 8331 8329 'PhabricatorPhameApplication' => 'PhabricatorApplication', 8332 8330 'PhabricatorPhameBlogPHIDType' => 'PhabricatorPHIDType',
-81
src/applications/auth/provider/PhabricatorPersonaAuthProvider.php
··· 1 - <?php 2 - 3 - final class PhabricatorPersonaAuthProvider extends PhabricatorAuthProvider { 4 - 5 - private $adapter; 6 - 7 - public function getProviderName() { 8 - return pht('Persona'); 9 - } 10 - 11 - public function getDescriptionForCreate() { 12 - return pht('Allow users to login or register using Mozilla Persona.'); 13 - } 14 - 15 - public function getAdapter() { 16 - if (!$this->adapter) { 17 - $adapter = new PhutilPersonaAuthAdapter(); 18 - $this->adapter = $adapter; 19 - } 20 - return $this->adapter; 21 - } 22 - 23 - protected function renderLoginForm( 24 - AphrontRequest $request, 25 - $mode) { 26 - 27 - Javelin::initBehavior( 28 - 'persona-login', 29 - array( 30 - 'loginURI' => PhabricatorEnv::getURI($this->getLoginURI()), 31 - )); 32 - 33 - return $this->renderStandardLoginButton( 34 - $request, 35 - $mode, 36 - array( 37 - 'uri' => $this->getLoginURI(), 38 - 'sigil' => 'persona-login-form', 39 - )); 40 - } 41 - 42 - public function isLoginFormAButton() { 43 - return true; 44 - } 45 - 46 - public function processLoginRequest( 47 - PhabricatorAuthLoginController $controller) { 48 - 49 - $request = $controller->getRequest(); 50 - $adapter = $this->getAdapter(); 51 - 52 - $account = null; 53 - $response = null; 54 - 55 - if (!$request->isAjax()) { 56 - throw new Exception(pht('Expected this request to come via Ajax.')); 57 - } 58 - 59 - $assertion = $request->getStr('assertion'); 60 - if (!$assertion) { 61 - throw new Exception(pht('Expected identity assertion.')); 62 - } 63 - 64 - $adapter->setAssertion($assertion); 65 - $adapter->setAudience(PhabricatorEnv::getURI('/')); 66 - 67 - try { 68 - $account_id = $adapter->getAccountID(); 69 - } catch (Exception $ex) { 70 - // TODO: Handle this in a more user-friendly way. 71 - throw $ex; 72 - } 73 - 74 - return array($this->loadOrCreateAccount($account_id), $response); 75 - } 76 - 77 - protected function getLoginIcon() { 78 - return 'Persona'; 79 - } 80 - 81 - }
-4
webroot/rsrc/css/sprite-login.css
··· 83 83 background-position: 0px -87px; 84 84 } 85 85 86 - .login-Persona { 87 - background-position: -29px -87px; 88 - } 89 - 90 86 .login-Phabricator { 91 87 background-position: -58px -87px; 92 88 }
-41
webroot/rsrc/js/application/auth/behavior-persona-login.js
··· 1 - /** 2 - * @provides javelin-behavior-persona-login 3 - * @requires javelin-behavior 4 - * javelin-resource 5 - * javelin-stratcom 6 - * javelin-workflow 7 - * javelin-util 8 - */ 9 - 10 - JX.behavior('persona-login', function(config) { 11 - 12 - JX.Stratcom.listen( 13 - 'submit', 14 - 'persona-login-form', 15 - function(e) { 16 - e.kill(); 17 - navigator.id.request(); 18 - }); 19 - 20 - var onloaded = function() { 21 - // Before installing watch(), log the user out, because we know they don't 22 - // have a valid session if they're hitting this page. If we don't do this, 23 - // Persona may immediately trigger a login event, which prevents the user 24 - // from selecting another authentication mechanism. 25 - navigator.id.logout(); 26 - 27 - navigator.id.watch({ 28 - loggedInUser: null, 29 - onlogin: onlogin, 30 - onlogout: JX.bag 31 - }); 32 - }; 33 - 34 - var onlogin = function(assertion) { 35 - new JX.Workflow(config.loginURI, {assertion: assertion}) 36 - .start(); 37 - }; 38 - 39 - var persona_library = 'https://login.persona.org/include.js'; 40 - JX.Resource.load(persona_library, onloaded); 41 - });