NCP-2 add logout

This commit is contained in:
vladp
2025-11-25 14:20:28 +07:00
parent a201e13639
commit adec554122
3 changed files with 17 additions and 4 deletions
@@ -78,6 +78,10 @@ public class AuthService {
return authTokenRepository.save(authToken);
}
public void logout(String token) {
authTokenRepository.findByToken(token)
.ifPresent(authTokenRepository::delete);
}
private String generateAuthToken() {
byte[] bytes = new byte[32];