feat(auth): add configurable token renew threshold

- Add renew-threshold JWT config option with PT5M default
- Default valid-time to PT2H in TokenProperties
- Expand comments in the prod config example
This commit is contained in:
zihluwang committed 2026-08-11 00:54:46 +08:00
1 parent a765c705e6
commit 0a7882c5ce
2 files changed
+42 -8

No files matched your search

@@ -1,6 +1,7 @@
package com.onixbyte.deltaforceguide.properties;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.bind.DefaultValue;
import java.time.Duration;
@@ -16,6 +17,7 @@ import java.time.Duration;
public record TokenProperties(
String issuer,
String secret,
Duration validTime
@DefaultValue("PT2H") Duration validTime,
@DefaultValue("PT5M") Duration renewThreshold
) {
}