refactoring
This commit is contained in:
1 parent
2961293a39
commit
5b1e7464c2
1 file changed
-23
@@ -34,26 +34,3 @@ void auth(const httplib::Request& request, httplib::Response& response) {
|
||||
response_json << "{\"token\":\"" << token << "\"}";
|
||||
response.set_content(response_json.str(), "application/json");
|
||||
}
|
||||
|
||||
// // function for verify tokens
|
||||
// bool verify_auth(const std::string token) {
|
||||
// try {
|
||||
// // parse token
|
||||
// const auto decoded = jwt::decode(token);
|
||||
|
||||
// // validate token
|
||||
// const auto verifier = jwt::verify()
|
||||
// .allow_algorithm(jwt::algorithm::hs256{JWT_SECRET_KEY})
|
||||
// .with_issuer("auth0");
|
||||
|
||||
// verifier.verify(decoded);
|
||||
// return true;
|
||||
// }
|
||||
// catch (const std::system_error& e) {
|
||||
// std::cout << "Verification error: " << e.what() << std::endl;
|
||||
// return false;
|
||||
// }
|
||||
// catch (...) {
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
Reference in new issue
Block a user