Skip to content
Snippets Groups Projects
Commit 7b9668cc authored by Evgeny Lavrik's avatar Evgeny Lavrik
Browse files

Generate root dictionary for FairDbWt lib, fix password verification

parent 1b683cb7
No related branches found
No related tags found
No related merge requests found
......@@ -26,6 +26,7 @@ set(INCLUDE_DIRECTORIES
${CMAKE_SOURCE_DIR}/dbWt/treeview
${CMAKE_SOURCE_DIR}/dbWt/graphics
${CMAKE_SOURCE_DIR}/dbWt/auth/model
${CMAKE_SOURCE_DIR}/REST
${CMAKE_SOURCE_DIR}/dbInterface
${CMAKE_SOURCE_DIR}/dbValidation
${CMAKE_SOURCE_DIR}/dbInput
......@@ -48,7 +49,7 @@ set(LINK_DIRECTORIES
link_directories(${LINK_DIRECTORIES})
set(SRCS
set(NO_DICT_SRCS
FairDbWtApplication.cxx
FairDbWtMainWidget.cxx
FairDbWtConnMySQLWidget.cxx
......@@ -82,12 +83,16 @@ REST/FairDbWtBaseResource.cxx
REST/FairDbWtAuthResource.cxx
REST/FairDbWtUserResource.cxx
REST/FairDbWtAdminResource.cxx
)
set(SRCS
REST/FairDbWtPasswordService.cxx
)
install(FILES "REST/FairDbWtGenericResource.h" DESTINATION include)
install(FILES "REST/FairDbWtGenericResource.tpl" DESTINATION include)
set(LINKDEF FairDbWtLinkDef.h)
set(LIBRARY_NAME FairDbWt)
if (Boost_FOUND)
......
/********************************************************************************
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence version 3 (LGPL) version 3, *
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ class FairDbWtPasswordData-;
#pragma link C++ class FairDbWtPasswordService-;
#endif
......@@ -21,6 +21,6 @@ bool FairDbWtPasswordService::VerifyPassword(std::string password, FairDbWtPassw
Wt::Auth::BCryptHashFunction *bcrypt = new Wt::Auth::BCryptHashFunction(7);
verifier.addHashFunction(bcrypt);
Wt::Auth::PasswordHash hash = verifier.hashPassword(password);
Wt::Auth::PasswordHash hash(bcrypt->name(), passwordData.Salt, passwordData.Hash);
return verifier.verify(password, hash);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment