Merge pull request #9823 from MrPetovan/task/9677-2fa-remember-device

Add "Remember this device" feature to two factor authentication
This commit is contained in:
Michael Vogel 2021-01-27 22:32:08 +01:00 committed by GitHub
commit 199f72ee3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
48 changed files with 988 additions and 248 deletions

View file

@ -348,6 +348,20 @@ return [
"PRIMARY" => ["uid", "code"]
]
],
"2fa_trusted_browser" => [
"comment" => "Two-factor authentication trusted browsers",
"fields" => [
"cookie_hash" => ["type" => "varchar(80)", "not null" => "1", "primary" => "1", "comment" => "Trusted cookie hash"],
"uid" => ["type" => "mediumint unsigned", "not null" => "1", "foreign" => ["user" => "uid"], "comment" => "User ID"],
"user_agent" => ["type" => "text", "comment" => "User agent string"],
"created" => ["type" => "datetime", "not null" => "1", "comment" => "Datetime the trusted browser was recorded"],
"last_used" => ["type" => "datetime", "comment" => "Datetime the trusted browser was last used"],
],
"indexes" => [
"PRIMARY" => ["cookie_hash"],
"uid" => ["uid"],
]
],
"addon" => [
"comment" => "registered addons",
"fields" => [

View file

@ -386,6 +386,7 @@ return [
'/recovery' => [Module\Settings\TwoFactor\Recovery::class, [R::GET, R::POST]],
'/app_specific' => [Module\Settings\TwoFactor\AppSpecific::class, [R::GET, R::POST]],
'/verify' => [Module\Settings\TwoFactor\Verify::class, [R::GET, R::POST]],
'/trusted' => [Module\Settings\TwoFactor\Trusted::class, [R::GET, R::POST]],
],
'/delegation[/{action}/{user_id}]' => [Module\Settings\Delegation::class, [R::GET, R::POST]],
'/display' => [Module\Settings\Display::class, [R::GET, R::POST]],