File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Sources/XKit/DeveloperServices/OpenAPI Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -15,13 +15,14 @@ public struct ASCKey: Sendable {
1515
1616actor ASCJWTGenerator {
1717 // the duration for which we generate JWTs.
18- // ASC allows a maximum of 20 minutes.
19- private static let ttl : TimeInterval = 60 * 20
18+ // ASC allows a maximum of 20 minutes. We use
19+ // 15 minutes to account for clock drift.
20+ private static let ttl : TimeInterval = 60 * 15
2021
2122 // the minimum remaining ttl for us to consider reusing a previous key.
2223 // that is, we reuse the last JWT if it has at least [threshold] seconds
2324 // left before it expires.
24- private static let tolerance : TimeInterval = 60
25+ private static let tolerance : TimeInterval = 60 * 2
2526
2627 private static let encoder : JSONEncoder = {
2728 let encoder = JSONEncoder ( )
You can’t perform that action at this time.
0 commit comments