File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
tokens/src/main/java/io/scalecube/security/tokens/jwt Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -156,21 +156,49 @@ public static class Builder {
156
156
private Duration requestTimeout = Duration .ofSeconds (10 );
157
157
private int keyTtl = 60 * 1000 ;
158
158
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
+ */
159
167
public Builder jwksUri (String jwksUri ) {
160
168
this .jwksUri = URI .create (jwksUri );
161
169
return this ;
162
170
}
163
171
172
+ /**
173
+ * Setter for {@code connectTimeout}.
174
+ *
175
+ * @param connectTimeout connectTimeout (optional)
176
+ * @return this
177
+ */
164
178
public Builder connectTimeout (Duration connectTimeout ) {
165
179
this .connectTimeout = connectTimeout ;
166
180
return this ;
167
181
}
168
182
183
+ /**
184
+ * Setter for {@code requestTimeout}.
185
+ *
186
+ * @param requestTimeout requestTimeout (optional)
187
+ * @return this
188
+ */
169
189
public Builder requestTimeout (Duration requestTimeout ) {
170
190
this .requestTimeout = requestTimeout ;
171
191
return this ;
172
192
}
173
193
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
+ */
174
202
public Builder keyTtl (int keyTtl ) {
175
203
this .keyTtl = keyTtl ;
176
204
return this ;
You can’t perform that action at this time.
0 commit comments