void Session::configureAuth() { myAuthService.setAuthTokensEnabled(true, "logincookie"); myAuthService.setEmailVerificationEnabled(true); auto verifier = Wt::cpp14::make_unique<Wt::Auth::PasswordVerifier>(); verifier->addHashFunction(Wt::cpp14::make_unique<Wt::Auth::BCryptHashFunction>()); myPasswordService.setVerifier(std::move(verifier)); myPasswordService.setAttemptThrottlingEnabled(true); // myPasswordService.setStrengthValidator // (Wt::cpp14::make_unique<Wt::Auth::PasswordStrengthValidator>()); }
void session::configure_auth() { auth_service.setAuthTokensEnabled(true, "muda"); auth_service.setEmailVerificationEnabled(true); auto verifier = new wo::PasswordVerifier; verifier->addHashFunction(new wo::BCryptHashFunction{7}); password_service.setVerifier(verifier); password_service.setAttemptThrottlingEnabled(true); if(wo::GoogleService::configured()) oauth_services.push_back(std::make_shared<wo::GoogleService>(auth_service)); }