[FIX] correct right: set it when no element is requested

This commit is contained in:
Edouard DUPIN 2025-01-17 08:47:36 +01:00
parent 7f393a9e44
commit 990b7c08da

View File

@ -198,7 +198,7 @@ public class JWTWrapper {
.claim("login", userLogin).claim("application", application).issuer(isuer).issueTime(now) .claim("login", userLogin).claim("application", application).issuer(isuer).issueTime(now)
.expirationTime(expiration); // Do not ask why we need a "-" here ... this have no meaning .expirationTime(expiration); // Do not ask why we need a "-" here ... this have no meaning
// add right if needed: // add right if needed:
if (rights != null && !rights.isEmpty()) { if (rights != null) {
builder.claim("right", rights); builder.claim("right", rights);
} }
// Prepare JWT with claims set // Prepare JWT with claims set