Skip to content

Commit 1825fe8

Browse files
committed
Cosmetic changes
1 parent fccb051 commit 1825fe8

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

tokens/src/main/java/io/scalecube/security/tokens/jwt/JwksKeyLocator.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,21 +156,49 @@ public static class Builder {
156156
private Duration requestTimeout = Duration.ofSeconds(10);
157157
private int keyTtl = 60 * 1000;
158158

159+
/**
160+
* Setter for JWKS URI. The JWKS URI typically follows a well-known pattern, such as
161+
* https://server_domain/.well-known/jwks.json. This endpoint is a read-only URL that responds
162+
* to GET requests by returning the JWKS in JSON format.
163+
*
164+
* @param jwksUri jwksUri
165+
* @return this
166+
*/
159167
public Builder jwksUri(String jwksUri) {
160168
this.jwksUri = URI.create(jwksUri);
161169
return this;
162170
}
163171

172+
/**
173+
* Setter for {@code connectTimeout}.
174+
*
175+
* @param connectTimeout connectTimeout (optional)
176+
* @return this
177+
*/
164178
public Builder connectTimeout(Duration connectTimeout) {
165179
this.connectTimeout = connectTimeout;
166180
return this;
167181
}
168182

183+
/**
184+
* Setter for {@code requestTimeout}.
185+
*
186+
* @param requestTimeout requestTimeout (optional)
187+
* @return this
188+
*/
169189
public Builder requestTimeout(Duration requestTimeout) {
170190
this.requestTimeout = requestTimeout;
171191
return this;
172192
}
173193

194+
/**
195+
* Setter for {@code keyTtl}. Keys that was obtained from JWKS URI gets cached for some period
196+
* of time, after that they being removed from the cache. This caching time period is controlled
197+
* by {@code keyTtl} setting.
198+
*
199+
* @param keyTtl keyTtl (optional)
200+
* @return this
201+
*/
174202
public Builder keyTtl(int keyTtl) {
175203
this.keyTtl = keyTtl;
176204
return this;

0 commit comments

Comments
 (0)