Fix build on wt 4.0.3
This commit is contained in:
+1
-1
@@ -74,7 +74,7 @@ AC_CHECK_LIB( [tag],
|
|||||||
AC_CHECK_LIB( [config++],
|
AC_CHECK_LIB( [config++],
|
||||||
[main],
|
[main],
|
||||||
,
|
,
|
||||||
[AC_MSG_ERROR([libtag not found!])])
|
[AC_MSG_ERROR([libconfig++ not found!])])
|
||||||
|
|
||||||
AC_CONFIG_FILES([Makefile
|
AC_CONFIG_FILES([Makefile
|
||||||
src/Makefile
|
src/Makefile
|
||||||
|
|||||||
@@ -17,8 +17,6 @@
|
|||||||
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <boost/make_unique.hpp>
|
|
||||||
|
|
||||||
#include <Wt/Dbo/FixedSqlConnectionPool.h>
|
#include <Wt/Dbo/FixedSqlConnectionPool.h>
|
||||||
#include <Wt/Dbo/backend/Sqlite3.h>
|
#include <Wt/Dbo/backend/Sqlite3.h>
|
||||||
|
|
||||||
@@ -53,7 +51,12 @@ Handler::configureAuth(void)
|
|||||||
authService.setAuthTokensEnabled(true, "lmsauth");
|
authService.setAuthTokensEnabled(true, "lmsauth");
|
||||||
authService.setIdentityPolicy(Wt::Auth::IdentityPolicy::LoginName);
|
authService.setIdentityPolicy(Wt::Auth::IdentityPolicy::LoginName);
|
||||||
authService.setRandomTokenLength(32);
|
authService.setRandomTokenLength(32);
|
||||||
|
|
||||||
|
#if WT_VERSION < 0X04000300
|
||||||
authService.setTokenHashFunction(new Wt::Auth::BCryptHashFunction(8));
|
authService.setTokenHashFunction(new Wt::Auth::BCryptHashFunction(8));
|
||||||
|
#else
|
||||||
|
authService.setTokenHashFunction(std::make_unique<Wt::Auth::BCryptHashFunction>(8));
|
||||||
|
#endif
|
||||||
|
|
||||||
auto verifier = std::make_unique<Wt::Auth::PasswordVerifier>();
|
auto verifier = std::make_unique<Wt::Auth::PasswordVerifier>();
|
||||||
verifier->addHashFunction(std::make_unique<Wt::Auth::BCryptHashFunction>(8));
|
verifier->addHashFunction(std::make_unique<Wt::Auth::BCryptHashFunction>(8));
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <array>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user