76{
77 myAuthService.setAuthTokensEnabled(true, "hangmancookie");
78 myAuthService.setEmailVerificationEnabled(true);
79
80 std::unique_ptr<Auth::PasswordVerifier> verifier
81 = std::make_unique<Auth::PasswordVerifier>();
82 verifier->addHashFunction(std::make_unique<Auth::BCryptHashFunction>(7));
83
84#ifdef HAVE_CRYPT
85
86
87 verifier->addHashFunction(std::make_unique<UnixCryptHashFunction>());
88#endif
89
90 myPasswordService.setVerifier(std::move(verifier));
91 myPasswordService.setStrengthValidator(std::make_unique<Auth::PasswordStrengthValidator>());
92 myPasswordService.setAttemptThrottlingEnabled(true);
93
94 if (Auth::GoogleService::configured())
95 myOAuthServices.push_back(new Auth::GoogleService(myAuthService));
96}