diff options
author | Marvin Borner | 2018-05-23 22:23:28 +0200 |
---|---|---|
committer | Marvin Borner | 2018-05-23 22:23:28 +0200 |
commit | b66a61addb6c8e66cb26fcf74b532d68891267e4 (patch) | |
tree | 05e9449ff25bdc98f68105f41923ccb9f6ef5095 /main/app/sprinkles/account/config | |
parent | 1d4ef435177a5f9b6d1a289800d933e49be0c550 (diff) |
Refactored code, many fixes and improvements in chat backend+frontend
Diffstat (limited to 'main/app/sprinkles/account/config')
-rw-r--r-- | main/app/sprinkles/account/config/default.php | 140 | ||||
-rw-r--r-- | main/app/sprinkles/account/config/production.php | 124 |
2 files changed, 132 insertions, 132 deletions
diff --git a/main/app/sprinkles/account/config/default.php b/main/app/sprinkles/account/config/default.php index e154643..078c136 100644 --- a/main/app/sprinkles/account/config/default.php +++ b/main/app/sprinkles/account/config/default.php @@ -1,79 +1,79 @@ <?php - /** - * Account configuration file for UserFrosting. - * - */ +/** + * Account configuration file for UserFrosting. + * + */ - return [ - 'debug' => [ - 'auth' => false - ], - // configuration for the 'password reset' feature - 'password_reset' => [ - 'algorithm' => 'sha512', - 'timeouts' => [ - 'create' => 86400, - 'reset' => 10800 - ] - ], - // See https://github.com/gbirke/rememberme for an explanation of these settings - 'remember_me' => [ - 'cookie' => [ - 'name' => 'rememberme' - ], - 'expire_time' => 604800, - 'session' => [ - 'path' => '/' - ], - 'table' => [ - 'tableName' => 'persistences', - 'credentialColumn' => 'user_id', - 'tokenColumn' => 'token', - 'persistentTokenColumn' => 'persistent_token', - 'expiresColumn' => 'expires_at' - ] - ], - 'reserved_user_ids' => [ - 'guest' => -1, - 'master' => 1 +return [ + 'debug' => [ + 'auth' => FALSE + ], + // configuration for the 'password reset' feature + 'password_reset' => [ + 'algorithm' => 'sha512', + 'timeouts' => [ + 'create' => 86400, + 'reset' => 10800 + ] + ], + // See https://github.com/gbirke/rememberme for an explanation of these settings + 'remember_me' => [ + 'cookie' => [ + 'name' => 'rememberme' ], + 'expire_time' => 604800, 'session' => [ - // The keys used in the session to store info about authenticated users - 'keys' => [ - 'current_user_id' => 'account.current_user_id', // the key to use for storing the authenticated user's id - 'captcha' => 'account.captcha' // Key used to store a captcha hash during captcha verification - ] + 'path' => '/' + ], + 'table' => [ + 'tableName' => 'persistences', + 'credentialColumn' => 'user_id', + 'tokenColumn' => 'token', + 'persistentTokenColumn' => 'persistent_token', + 'expiresColumn' => 'expires_at' + ] + ], + 'reserved_user_ids' => [ + 'guest' => -1, + 'master' => 1 + ], + 'session' => [ + // The keys used in the session to store info about authenticated users + 'keys' => [ + 'current_user_id' => 'account.current_user_id', // the key to use for storing the authenticated user's id + 'captcha' => 'account.captcha' // Key used to store a captcha hash during captcha verification + ] + ], + // "Site" settings that are automatically passed to Twig + 'site' => [ + 'login' => [ + 'enable_email' => TRUE ], - // "Site" settings that are automatically passed to Twig - 'site' => [ - 'login' => [ - 'enable_email' => true - ], - 'registration' => [ - 'enabled' => true, - 'captcha' => true, - 'require_email_verification' => true, - 'user_defaults' => [ - 'locale' => 'en_US', - 'group' => 'terran', - // Default roles for newly registered users - 'roles' => [ - 'user' => true - ] + 'registration' => [ + 'enabled' => TRUE, + 'captcha' => TRUE, + 'require_email_verification' => TRUE, + 'user_defaults' => [ + 'locale' => 'en_US', + 'group' => 'terran', + // Default roles for newly registered users + 'roles' => [ + 'user' => TRUE ] ] - ], - 'throttles' => [ - 'check_username_request' => null, - 'password_reset_request' => null, - 'registration_attempt' => null, - 'sign_in_attempt' => null, - 'verification_request' => null - ], - // configuration for the 'email verification' feature - 'verification' => [ - 'algorithm' => 'sha512', - 'timeout' => 10800 ] - ]; + ], + 'throttles' => [ + 'check_username_request' => NULL, + 'password_reset_request' => NULL, + 'registration_attempt' => NULL, + 'sign_in_attempt' => NULL, + 'verification_request' => NULL + ], + // configuration for the 'email verification' feature + 'verification' => [ + 'algorithm' => 'sha512', + 'timeout' => 10800 + ] +]; diff --git a/main/app/sprinkles/account/config/production.php b/main/app/sprinkles/account/config/production.php index b7c3288..42b8ada 100644 --- a/main/app/sprinkles/account/config/production.php +++ b/main/app/sprinkles/account/config/production.php @@ -1,67 +1,67 @@ <?php - /** - * Account production config file for UserFrosting. You may override/extend this in your site's configuration file to customize deploy settings. - * - */ +/** + * Account production config file for UserFrosting. You may override/extend this in your site's configuration file to customize deploy settings. + * + */ - return [ - // See http://security.stackexchange.com/a/59550/74909 for the inspiration for our throttling system - 'throttles' => [ - 'check_username_request' => [ - 'method' => 'ip', - 'interval' => 3600, - 'delays' => [ - 40 => 1000 - ] - ], - 'password_reset_request' => [ - 'method' => 'ip', - 'interval' => 3600, - 'delays' => [ - 2 => 5, - 3 => 10, - 4 => 20, - 5 => 40, - 6 => 80, - 7 => 600 - ] - ], - 'registration_attempt' => [ - 'method' => 'ip', - 'interval' => 3600, - 'delays' => [ - 2 => 5, - 3 => 10, - 4 => 20, - 5 => 40, - 6 => 80, - 7 => 600 - ] - ], - 'sign_in_attempt' => [ - 'method' => 'ip', - 'interval' => 3600, - 'delays' => [ - 4 => 5, - 5 => 10, - 6 => 20, - 7 => 40, - 8 => 80, - 9 => 600 - ] - ], - 'verification_request' => [ - 'method' => 'ip', - 'interval' => 3600, - 'delays' => [ - 2 => 5, - 3 => 10, - 4 => 20, - 5 => 40, - 6 => 80, - 7 => 600 - ] +return [ + // See http://security.stackexchange.com/a/59550/74909 for the inspiration for our throttling system + 'throttles' => [ + 'check_username_request' => [ + 'method' => 'ip', + 'interval' => 3600, + 'delays' => [ + 40 => 1000 + ] + ], + 'password_reset_request' => [ + 'method' => 'ip', + 'interval' => 3600, + 'delays' => [ + 2 => 5, + 3 => 10, + 4 => 20, + 5 => 40, + 6 => 80, + 7 => 600 + ] + ], + 'registration_attempt' => [ + 'method' => 'ip', + 'interval' => 3600, + 'delays' => [ + 2 => 5, + 3 => 10, + 4 => 20, + 5 => 40, + 6 => 80, + 7 => 600 + ] + ], + 'sign_in_attempt' => [ + 'method' => 'ip', + 'interval' => 3600, + 'delays' => [ + 4 => 5, + 5 => 10, + 6 => 20, + 7 => 40, + 8 => 80, + 9 => 600 + ] + ], + 'verification_request' => [ + 'method' => 'ip', + 'interval' => 3600, + 'delays' => [ + 2 => 5, + 3 => 10, + 4 => 20, + 5 => 40, + 6 => 80, + 7 => 600 ] ] - ]; + ] +]; |