예제 #1
0
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>());
}
예제 #2
0
파일: session.cpp 프로젝트: mempko/muda
            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));
            }