put the params in the body and fixed token issue
This commit is contained in:
@ -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");
|
||||
|
||||
Reference in New Issue
Block a user