mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-03-01 01:40:50 +01:00
Assert minimum JWT expiration time
This commit is contained in:
@@ -173,6 +173,10 @@ public final class JwtAccessTokenBuilder implements AccessTokenBuilder {
|
||||
// add scope to custom claims
|
||||
Scopes.toClaims(customClaims, scope);
|
||||
|
||||
if (expiresIn < 1) {
|
||||
expiresIn = 1;
|
||||
}
|
||||
|
||||
Instant now = clock.instant();
|
||||
long expiration = expiresInUnit.toMillis(expiresIn);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user