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:
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
|
||||
) {
|
||||
}
|
||||
Reference in new issue
Block a user