Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.

Commit e1769bf

Browse files
authored
fix: logic for jwks endpoint unmarshalling was incorrect (#594)
1 parent 4f8da2c commit e1769bf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- chore: Trigger internal release pipeline at the end of the release-runtime workflow [#577](https://github.com/hypermodeinc/modus/pull/577)
77
- feat: Add API explorer to runtime [#578](https://github.com/hypermodeinc/modus/pull/578)
88
- feat: Add API explorer component to runtime [#584](https://github.com/hypermodeinc/modus/pull/584)
9+
- fix: logic for jwks endpoint unmarshalling was incorrect [#594](https://github.com/hypermodeinc/modus/pull/594)
910

1011
## 2024-11-18 - AssemblyScript SDK 0.13.5
1112

runtime/middleware/authKeys.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,14 @@ func (ak *AuthKeys) worker(ctx context.Context) {
8888
// refresh JWKS keys
8989
keysStr := os.Getenv("MODUS_JWKS_ENDPOINTS")
9090
if keysStr != "" {
91-
timer.Reset(time.Duration(getJwksRefreshMinutes(ctx)) * time.Minute)
92-
} else {
9391
keys, err := jwksEndpointsJsonToKeys(ctx, keysStr)
9492
if err != nil {
9593
logger.Error(ctx).Err(err).Msg("Auth JWKS public keys deserializing error")
9694
} else {
9795
ak.setJwksPublicKeys(keys)
9896
}
9997
}
98+
timer.Reset(time.Duration(getJwksRefreshMinutes(ctx)) * time.Minute)
10099
case <-ak.quit:
101100
return
102101
}

0 commit comments

Comments
 (0)