Older/WebApplication/Session.h
amass d37cf655dc
Some checks failed
Deploy / Build (push) Failing after 6m49s
Deploy Docker Images / Build dockerfile and Server deploy (push) Successful in 1h12m51s
clean code.
2024-11-14 23:06:22 +08:00

24 lines
574 B
C++

#ifndef __SESSION_H__
#define __SESSION_H__
#include "User.h"
#include <Wt/Auth/Login.h>
#include <Wt/Dbo/Session.h>
using UserDatabase = Wt::Auth::Dbo::UserDatabase<AuthInfo>;
class Session : public Wt::Dbo::Session {
public:
Session(Wt::Dbo::SqlConnectionPool &connectionPool);
~Session();
Wt::Dbo::ptr<User> user() const;
Wt::Auth::AbstractUserDatabase &users();
Wt::Auth::Login &login();
private:
Wt::Dbo::SqlConnectionPool &m_connectionPool;
std::unique_ptr<UserDatabase> m_users;
Wt::Auth::Login m_login;
};
#endif // __SESSION_H__