22 lines
590 B
C++
22 lines
590 B
C++
#include <Void/Async/Executor.hpp>
|
|
#include <Void/Security/Authenticator.hpp>
|
|
|
|
#include <memory>
|
|
|
|
int main()
|
|
{
|
|
auto store = std::make_shared<Void::SecurityAsync::InMemoryAccountSessionStore>();
|
|
Void::Async::ManualExecutor exec;
|
|
Void::SecurityAsync::AuthenticatorOptions opts{};
|
|
opts.dummy_hash_strength = Void::Security::PasswordHashStrength::Interactive;
|
|
auto auth = Void::SecurityAsync::Authenticator::create(store, exec, opts);
|
|
if (!auth.has_value()) {
|
|
return 1;
|
|
}
|
|
if ((*auth)->stats().active_password_jobs != 0) {
|
|
return 2;
|
|
}
|
|
(void)(*auth)->close_and_join();
|
|
return 0;
|
|
}
|