2017-12-23 13:46:52 -06:00
|
|
|
<?php
|
2019-10-01 23:38:00 -05:00
|
|
|
/**
|
|
|
|
* google2fa.php
|
2020-03-17 11:06:30 -05:00
|
|
|
* Copyright (c) 2019 james@firefly-iii.org.
|
2019-10-01 23:38:00 -05:00
|
|
|
*
|
|
|
|
* This file is part of Firefly III (https://github.com/firefly-iii).
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License as
|
|
|
|
* published by the Free Software Foundation, either version 3 of the
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Affero General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2019-08-17 05:09:03 -05:00
|
|
|
declare(strict_types=1);
|
2017-12-23 13:46:52 -06:00
|
|
|
|
2022-03-30 13:09:19 -05:00
|
|
|
use PragmaRX\Google2FALaravel\Support\Constants;
|
|
|
|
|
2017-12-23 13:46:52 -06:00
|
|
|
return [
|
2023-12-20 12:39:53 -06:00
|
|
|
// Auth container binding
|
2017-12-23 13:46:52 -06:00
|
|
|
|
2024-01-01 07:45:51 -06:00
|
|
|
'enabled' => true,
|
2017-12-23 13:46:52 -06:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Lifetime in minutes.
|
|
|
|
* In case you need your users to be asked for a new one time passwords from time to time.
|
|
|
|
*/
|
|
|
|
|
2024-01-01 07:45:51 -06:00
|
|
|
'lifetime' => 0, // 0 = eternal
|
2017-12-23 13:46:52 -06:00
|
|
|
|
2023-12-20 12:39:53 -06:00
|
|
|
// Renew lifetime at every new request.
|
2017-12-23 13:46:52 -06:00
|
|
|
|
2024-01-01 07:45:51 -06:00
|
|
|
'keep_alive' => true,
|
2017-12-23 13:46:52 -06:00
|
|
|
|
2023-12-20 12:39:53 -06:00
|
|
|
// Auth container binding
|
2017-12-23 13:46:52 -06:00
|
|
|
|
2024-01-01 07:45:51 -06:00
|
|
|
'auth' => 'auth',
|
2017-12-23 13:46:52 -06:00
|
|
|
|
2023-12-20 12:39:53 -06:00
|
|
|
// 2FA verified session var
|
2017-12-23 13:46:52 -06:00
|
|
|
|
2020-03-20 11:31:54 -05:00
|
|
|
'session_var' => 'google2fa',
|
2017-12-23 13:46:52 -06:00
|
|
|
|
2023-12-20 12:39:53 -06:00
|
|
|
// One Time Password request input name
|
2020-03-20 11:31:54 -05:00
|
|
|
'otp_input' => 'one_time_password',
|
2017-12-23 13:46:52 -06:00
|
|
|
|
2023-12-20 12:39:53 -06:00
|
|
|
// One Time Password Window
|
2020-03-20 11:31:54 -05:00
|
|
|
'window' => 1,
|
2017-12-23 13:46:52 -06:00
|
|
|
|
2023-12-20 12:39:53 -06:00
|
|
|
// Forbid user to reuse One Time Passwords.
|
2017-12-23 13:46:52 -06:00
|
|
|
'forbid_old_passwords' => false,
|
|
|
|
|
2023-12-20 12:39:53 -06:00
|
|
|
// User's table column for google2fa secret
|
2020-03-20 11:31:54 -05:00
|
|
|
'otp_secret_column' => 'mfa_secret',
|
2017-12-23 13:46:52 -06:00
|
|
|
|
2023-12-20 12:39:53 -06:00
|
|
|
// One Time Password View
|
2022-01-30 09:54:08 -06:00
|
|
|
'view' => 'auth.mfa',
|
2017-12-23 13:46:52 -06:00
|
|
|
|
2023-12-20 12:39:53 -06:00
|
|
|
// One Time Password error message
|
2020-03-20 11:31:54 -05:00
|
|
|
'error_messages' => [
|
2017-12-23 13:46:52 -06:00
|
|
|
'wrong_otp' => "The 'One Time Password' typed was wrong.",
|
|
|
|
],
|
|
|
|
|
2023-12-20 12:39:53 -06:00
|
|
|
// Throw exceptions or just fire events?
|
2020-03-20 11:31:54 -05:00
|
|
|
'throw_exceptions' => true,
|
2019-08-03 12:49:32 -05:00
|
|
|
|
2024-01-01 07:45:51 -06:00
|
|
|
'store_in_cookie' => true,
|
2019-12-07 10:44:33 -06:00
|
|
|
|
2022-03-30 13:09:19 -05:00
|
|
|
'qrcode_image_backend' => Constants::QRCODE_IMAGE_BACKEND_SVG,
|
2017-12-23 13:46:52 -06:00
|
|
|
];
|