Skip to content

Commit

Permalink
Merge pull request #7371 from paulmillar/fix/9.2/rb14102
Browse files Browse the repository at this point in the history
gplazma: oidc increase cache duration for OP public key material
  • Loading branch information
svemeyer authored Oct 5, 2023
2 parents f0bcbe4 + 11ceff7 commit c337f01
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,11 @@ public class Issuer {
private final HttpClient client;
private final boolean offlineSuppressed;

// Recommendation for six hours comes from this document:
// https://doi.org/10.5281/zenodo.3460258
private final Supplier<Map<String, PublicKey>> keys = MemoizeMapWithExpiry.memorize(this::readJwksDocument)
.whenEmptyFor(Duration.ofMinutes(1))
.whenNonEmptyFor(Duration.ofMinutes(10))
.whenNonEmptyFor(Duration.ofHours(6))
.build();

public Issuer(HttpClient client, IdentityProvider provider, int tokenHistory) {
Expand Down

0 comments on commit c337f01

Please sign in to comment.