Skip to content

Commit

Permalink
PR fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lahirumaramba committed May 22, 2024
1 parent 9b89367 commit 812628e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions auth/token_verifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,6 @@ func parsePublicKey(kid string, key []byte) (*publicKey, error) {
}

func findMaxAge(resp *http.Response) *time.Duration {
duration := time.Duration(0) * time.Second
cc := resp.Header.Get("cache-control")
for _, value := range strings.Split(cc, ",") {
value = strings.TrimSpace(value)
Expand All @@ -484,9 +483,10 @@ func findMaxAge(resp *http.Response) *time.Duration {
if err != nil {
seconds = 0
}
duration = time.Duration(seconds) * time.Second
duration := time.Duration(seconds) * time.Second
return &duration
}
}
return &duration
defaultDuration := time.Duration(0) * time.Second
return &defaultDuration
}

0 comments on commit 812628e

Please sign in to comment.