put the params in the body and fixed token issue
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 2m0s
Build and test backend / Test-backend (pull_request) Successful in 2m0s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 20s

This commit is contained in:
2024-03-08 20:54:23 +01:00
parent fba30cff9e
commit 82a3b152f2
2 changed files with 35 additions and 8 deletions

View File

@ -24,6 +24,13 @@ public class TokenService {
public String generateNewToken(){
byte[] bytes = new byte[64];
new SecureRandom().nextBytes(bytes);
for (int i = 0; i < bytes.length; i++) {
while (bytes[i] == 0){
byte[] temp = new byte[1];
new SecureRandom().nextBytes(temp);
bytes[i] = temp[0];
}
}
// will never end up in the catch because of the way that SecureRandom.nextBytes is implemented
try {
return new String(bytes,"ISO_8859_1");