mirror of
https://github.com/friendica/friendica
synced 2024-11-09 16:22:56 +00:00
Move Login/Logout/TwoFactor to bundled submodule "Security"
This commit is contained in:
parent
d30e8665e1
commit
aa5771cf3e
27 changed files with 31 additions and 26 deletions
|
@ -8,7 +8,7 @@ use Friendica\Core\Config;
|
|||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Module\Login;
|
||||
use Friendica\Module\Security\Login;
|
||||
|
||||
require_once __DIR__ . '/../include/api.php';
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ use Friendica\Core\Logger;
|
|||
use Friendica\Core\System;
|
||||
use Friendica\Core\Session;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Module\Login;
|
||||
use Friendica\Module\Security\Login;
|
||||
use Friendica\Protocol\DFRN;
|
||||
use Friendica\Protocol\OStatus;
|
||||
use Friendica\Util\Network;
|
||||
|
|
|
@ -25,7 +25,7 @@ use Friendica\Model\Contact;
|
|||
use Friendica\Model\Group;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Module\Login;
|
||||
use Friendica\Module\Security\Login;
|
||||
use Friendica\Network\Probe;
|
||||
use Friendica\Protocol\Activity;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
|
|
|
@ -19,7 +19,7 @@ use Friendica\Database\DBA;
|
|||
use Friendica\Model\Event;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Module\Login;
|
||||
use Friendica\Module\Security\Login;
|
||||
use Friendica\Util\ACLFormatter;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Strings;
|
||||
|
|
|
@ -15,7 +15,7 @@ use Friendica\Core\System;
|
|||
use Friendica\Database\DBA;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Mail;
|
||||
use Friendica\Module\Login;
|
||||
use Friendica\Module\Security\Login;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Proxy as ProxyUtils;
|
||||
use Friendica\Util\Strings;
|
||||
|
|
|
@ -27,7 +27,7 @@ use Friendica\Model\Group;
|
|||
use Friendica\Model\Item;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Model\Term;
|
||||
use Friendica\Module\Login;
|
||||
use Friendica\Module\Security\Login;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Proxy as ProxyUtils;
|
||||
use Friendica\Util\Strings;
|
||||
|
|
|
@ -13,7 +13,7 @@ use Friendica\Core\Protocol;
|
|||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Module\Login;
|
||||
use Friendica\Module\Security\Login;
|
||||
use Friendica\Model\Introduction;
|
||||
use Friendica\Model\Notify;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ use Friendica\App;
|
|||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Module\Login;
|
||||
use Friendica\Module\Security\Login;
|
||||
use Friendica\Util\Network;
|
||||
use Friendica\Util\Strings;
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ use Friendica\Model\Contact;
|
|||
use Friendica\Model\GContact;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Module\Login;
|
||||
use Friendica\Module\Security\Login;
|
||||
use Friendica\Network\Probe;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Strings;
|
||||
|
|
|
@ -11,7 +11,7 @@ use Friendica\Core\Worker;
|
|||
use Friendica\Database\DBA;
|
||||
use Friendica\Model\Register;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Module\Login;
|
||||
use Friendica\Module\Security\Login;
|
||||
|
||||
function user_allow($hash)
|
||||
{
|
||||
|
|
|
@ -24,7 +24,7 @@ use Friendica\Model\Contact;
|
|||
use Friendica\Model\GContact;
|
||||
use Friendica\Model\Group;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Module\Login;
|
||||
use Friendica\Module\Security\Login;
|
||||
use Friendica\Protocol\Email;
|
||||
use Friendica\Util\ACLFormatter;
|
||||
use Friendica\Util\Network;
|
||||
|
|
|
@ -18,7 +18,7 @@ use Friendica\Core\System;
|
|||
use Friendica\Core\Theme;
|
||||
use Friendica\Database\Database;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Module\Login;
|
||||
use Friendica\Module\Security\Login;
|
||||
use Friendica\Module\Special\HTTPException as ModuleHTTPException;
|
||||
use Friendica\Network\HTTPException;
|
||||
use Friendica\Util\ConfigFileLoader;
|
||||
|
|
|
@ -5,6 +5,7 @@ namespace Friendica\Module;
|
|||
use Friendica\BaseModule;
|
||||
use Friendica\Core\ACL;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Module\Security\Login;
|
||||
use Friendica\Network\HTTPException;
|
||||
use Friendica\Util\Strings;
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ use Friendica\Core\System;
|
|||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Model;
|
||||
use Friendica\Module\Security\Login;
|
||||
use Friendica\Network\HTTPException\BadRequestException;
|
||||
use Friendica\Network\HTTPException\NotFoundException;
|
||||
use Friendica\Network\Probe;
|
||||
|
|
|
@ -6,6 +6,7 @@ use Friendica\BaseModule;
|
|||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Module\Security\Login;
|
||||
|
||||
/**
|
||||
* Home module - Landing page of the current node
|
||||
|
|
|
@ -17,7 +17,7 @@ use Friendica\Model\FileTag;
|
|||
use Friendica\Model\Group;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Module\Login;
|
||||
use Friendica\Module\Security\Login;
|
||||
use Friendica\Network\HTTPException\NotImplementedException;
|
||||
use Friendica\Util\ACLFormatter;
|
||||
use Friendica\Util\Crypto;
|
||||
|
|
|
@ -19,6 +19,7 @@ use Friendica\Model\Group;
|
|||
use Friendica\Model\Item;
|
||||
use Friendica\Model\Profile as ProfileModel;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Module\Security\Login;
|
||||
use Friendica\Protocol\ActivityPub;
|
||||
use Friendica\Protocol\DFRN;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace Friendica\Module\Search;
|
|||
use Friendica\Content\Widget;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Module\BaseSearchModule;
|
||||
use Friendica\Module\Login;
|
||||
use Friendica\Module\Security\Login;
|
||||
use Friendica\Util\Strings;
|
||||
|
||||
/**
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* @file src/Module/Login.php
|
||||
*/
|
||||
|
||||
namespace Friendica\Module;
|
||||
namespace Friendica\Module\Security;
|
||||
|
||||
use Friendica\BaseModule;
|
||||
use Friendica\App\Authentication;
|
||||
|
@ -13,6 +13,7 @@ use Friendica\Core\Hook;
|
|||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\Session;
|
||||
use Friendica\Module\Register;
|
||||
use Friendica\Util\Strings;
|
||||
|
||||
/**
|
|
@ -3,7 +3,7 @@
|
|||
* @file src/Module/Logout.php
|
||||
*/
|
||||
|
||||
namespace Friendica\Module;
|
||||
namespace Friendica\Module\Security;
|
||||
|
||||
use Friendica\BaseModule;
|
||||
use Friendica\App\Authentication;
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Friendica\Module\TwoFactor;
|
||||
namespace Friendica\Module\Security\TwoFactor;
|
||||
|
||||
use Friendica\BaseModule;
|
||||
use Friendica\App\Authentication;
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Friendica\Module\TwoFactor;
|
||||
namespace Friendica\Module\Security\TwoFactor;
|
||||
|
||||
use Friendica\BaseModule;
|
||||
use Friendica\App\Authentication;
|
|
@ -9,7 +9,7 @@ use Friendica\Core\PConfig;
|
|||
use Friendica\Core\Renderer;
|
||||
use Friendica\Model\TwoFactor\AppSpecificPassword;
|
||||
use Friendica\Module\BaseSettingsModule;
|
||||
use Friendica\Module\Login;
|
||||
use Friendica\Module\Security\Login;
|
||||
|
||||
/**
|
||||
* // Page 5: 2FA enabled, app-specific password generation
|
||||
|
|
|
@ -12,7 +12,7 @@ use Friendica\Model\TwoFactor\AppSpecificPassword;
|
|||
use Friendica\Model\TwoFactor\RecoveryCode;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Module\BaseSettingsModule;
|
||||
use Friendica\Module\Login;
|
||||
use Friendica\Module\Security\Login;
|
||||
use PragmaRX\Google2FA\Google2FA;
|
||||
|
||||
class Index extends BaseSettingsModule
|
||||
|
|
|
@ -9,7 +9,7 @@ use Friendica\Core\PConfig;
|
|||
use Friendica\Core\Renderer;
|
||||
use Friendica\Model\TwoFactor\RecoveryCode;
|
||||
use Friendica\Module\BaseSettingsModule;
|
||||
use Friendica\Module\Login;
|
||||
use Friendica\Module\Security\Login;
|
||||
|
||||
/**
|
||||
* // Page 3: 2FA enabled but not verified, show recovery codes
|
||||
|
|
|
@ -14,7 +14,7 @@ use Friendica\Core\PConfig;
|
|||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\Session;
|
||||
use Friendica\Module\BaseSettingsModule;
|
||||
use Friendica\Module\Login;
|
||||
use Friendica\Module\Security\Login;
|
||||
use PragmaRX\Google2FA\Google2FA;
|
||||
|
||||
/**
|
||||
|
|
|
@ -23,8 +23,8 @@ return [
|
|||
],
|
||||
|
||||
'/2fa' => [
|
||||
'[/]' => [Module\TwoFactor\Verify::class, [R::GET, R::POST]],
|
||||
'/recovery' => [Module\TwoFactor\Recovery::class, [R::GET, R::POST]],
|
||||
'[/]' => [Module\Security\TwoFactor\Verify::class, [R::GET, R::POST]],
|
||||
'/recovery' => [Module\Security\TwoFactor\Recovery::class, [R::GET, R::POST]],
|
||||
],
|
||||
|
||||
'/api' => [
|
||||
|
@ -156,8 +156,8 @@ return [
|
|||
|
||||
'/like/{item:\d+}' => [Module\Like::class, [R::GET]],
|
||||
'/localtime' => [Module\Debug\Localtime::class, [R::GET, R::POST]],
|
||||
'/login' => [Module\Login::class, [R::GET, R::POST]],
|
||||
'/logout' => [Module\Logout::class, [R::GET, R::POST]],
|
||||
'/login' => [Module\Security\Login::class, [R::GET, R::POST]],
|
||||
'/logout' => [Module\Security\Logout::class, [R::GET, R::POST]],
|
||||
'/magic' => [Module\Magic::class, [R::GET]],
|
||||
'/maintenance' => [Module\Maintenance::class, [R::GET]],
|
||||
'/manifest' => [Module\Manifest::class, [R::GET]],
|
||||
|
|
Loading…
Reference in a new issue