Skip to content

Commit 6d689a8

Browse files
Merge pull request #62 from lglglglgy/main
DEL JWT
2 parents 28b3f34 + f522e94 commit 6d689a8

File tree

3 files changed

+42
-32
lines changed

3 files changed

+42
-32
lines changed

README.zh_Hans.md

Lines changed: 40 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -24,35 +24,47 @@
2424
- 使用 MySQL Connector/C++ 8.1.0 连接数据库
2525
### 入门
2626

27-
#### 安装
27+
### 安装(推荐)
28+
```bash
29+
sudo apt install git gcc g++ cmake libjsoncpp-dev uuid-dev zlib1g-dev openssl libssl-dev
30+
git clone https://github.com/stepbystepcode/flypen.git --recursive
31+
cd flypen
32+
./run.sh
33+
```
34+
35+
### 安装(常规)
36+
<details>
37+
<summary>过时的</summary>
38+
<br><br>
39+
<pre>
40+
git clone https://github.com/stepbystepcode/flypen.git
41+
cd flypen
42+
git submodule update --init
43+
cd drogon
44+
git submodule update --init
45+
sudo apt install git gcc g++ cmake libjsoncpp-dev uuid-dev zlib1g-dev openssl libssl-dev
46+
mkdir build
47+
cd build
48+
cmake ..
49+
make -j 8
50+
sudo make install
51+
cd ../..
52+
cd jwt-cpp
53+
mkdir build
54+
cd build
55+
cmake ..
56+
make -j 8
57+
sudo make install
58+
cd ../..
59+
wget https://dev.mysql.com/get/Downloads/Connector-C++/mysql-connector-c++-8.1.0-linux-glibc2.28-x86-64bit.tar.gz
60+
tar zxvf mysql-connector-c++-8.1.0-linux-glibc2.28-x86-64bit.tar.gz
61+
mv mysql-connector-c++-8.1.0-linux-glibc2.28-x86-64bit mysql-connector
62+
rm mysql-connector-c++-8.1.0-linux-glibc2.28-x86-64bit.tar.gz
63+
mkdir build
64+
./run.sh
65+
</pre>
66+
</details>
2867

29-
```
30-
git clone https://github.com/stepbystepcode/flypen.git
31-
cd flypen
32-
git submodule update --init
33-
cd drogon
34-
git submodule update --init
35-
sudo apt install git gcc g++ cmake libjsoncpp-dev uuid-dev zlib1g-dev openssl libssl-dev
36-
mkdir build
37-
cd build
38-
cmake .
39-
make -j 8
40-
sudo make install
41-
cd ./...
42-
cd jwt-cpp
43-
mkdir build
44-
cd build
45-
cmake .
46-
make -j 8
47-
sudo make install
48-
cd ../..
49-
wget https://dev.mysql.com/get/Downloads/Connector-C++/mysql-connector-c++-8.1.0-linux-glibc2.28-x86-64bit.tar.gz
50-
tar zxvf mysql-connector-c++-8.1.0-linux-glibc2.28-x86-64bit.tar.gz
51-
mv mysql-connector-c++-8.1.0-linux-glibc2.28-x86-64bit mysql-connector
52-
rm mysql-connector-c++-8.1.0-linux-glibc2.28-x86-64bit.tar.gz
53-
mkdir build
54-
./run.sh
55-
```
5668
## API 文档
5769
请参阅 [API.md](API.md) 了解有关身份验证、用户管理、文档等 API 的详细信息。
5870

jwt_controller.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ std::string jwtDecrypt(const std::string &token)
3434
}
3535
catch (const std::exception &e)
3636
{
37-
std::cout << "Failed to decrypt JWT: " + std::string(e.what()) << std::endl;
38-
throw std::runtime_error("Failed to decrypt JWT");
37+
// std::cout << "Failed to decrypt JWT: " + std::string(e.what()) << std::endl;
38+
// throw std::runtime_error("Failed to decrypt JWT");
3939
}
4040
}
4141

mysql.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ void sql_unlocked(const std::string& DeleteName);
88
void sql_add(const std::string& username, const std::string& passwd, int avatar);
99
bool sql_check(const std::string&, const std::string& passwd = "@DEFAULT@");
1010
void sql_addhistory(const std::string&, const std::string&, const std::string&, const std::string&);
11-
void sql_addconnect(std::string connectptr);
12-
1311
void sql_addrequest(const std::string& send, const std::string& receiver);
1412
void sql_process_request(const std::string&, const std::string&, const std::string&);
1513
Json::Value sql_find_my_msg(const std::string&, const std::string&);

0 commit comments

Comments
 (0)