npm installChạy file start_server.bat
POST: "http://localhost:8080/auth/login"
body: {
"username": "minhtriet2104",
"password": "1"
}
Response: {
"accessToken": "...token",
"refreshToken": "...token"
}POST: "http://localhost:8080/auth/register"
body: {
"username": "minhtriet2104",
"password": "1",
[oauth2: true/false]
}
Response: {
"accessToken": "...token",
"refreshToken": "...token"
}POST: "http://localhost:8080/auth/refresh"
body: {
"refreshToken": "...token",
}
Response: {
"accessToken": "...token",
}DELETE: "http://localhost:8080/auth/logout"
body: {
"refreshToken": "...token",
}GET: "http://localhost:8080/users"
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer ...token"
}