Skip to content

Commit 825c045

Browse files
committed
fixes #2219 upgrade to http-client 1.0.10 with Jwt class change
1 parent 73ba8ec commit 825c045

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

client/src/test/java/com/networknt/client/oauth/LongestExpireCacheStrategyTest.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,20 +50,20 @@ private static ArrayList<Jwt> createJwts(int num, long expiryTime) {
5050
ArrayList<Jwt> jwts = new ArrayList<>();
5151
for(int i = 0; i < num; i++) {
5252
Jwt jwt = new Jwt();
53-
jwt.setScopes(new HashSet<>(Arrays.asList(getScopes(i+1))));
53+
jwt.setScopes(getScopes(i+1));
5454
jwt.setExpire(expiryTime + i);
5555
jwts.add(jwt);
5656
}
5757
return jwts;
5858
}
5959

60-
private static String[] getScopes(int numsOfScopes){
60+
private static String getScopes(int numsOfScopes){
6161
String[] scopes = {"eat", "drink", "sleep", "study"};
6262
int length = numsOfScopes > scopes.length ? numsOfScopes%scopes.length : numsOfScopes;
6363
String[] result = new String[length];
6464
for(int i = 1; i <= length; i++) {
6565
result[i - 1] = scopes[i - 1];
6666
}
67-
return result;
67+
return String.join(" ", result);
6868
}
6969
}

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
<version.jsr305>3.0.2</version.jsr305>
8383
<version.json-schema-validator>1.0.65</version.json-schema-validator>
8484
<version.yaml-rule>1.0.3</version.yaml-rule>
85-
<version.http-client>1.0.8</version.http-client>
85+
<version.http-client>1.0.10</version.http-client>
8686
<version.snakeyaml>2.2</version.snakeyaml>
8787
<version.caffeine>3.1.5</version.caffeine>
8888
<version.prometheus>0.16.0</version.prometheus>

token-config/src/main/java/com/networknt/router/middleware/TokenConfig.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
public class TokenConfig {
1212
private static final Logger logger = LoggerFactory.getLogger(TokenConfig.class);
13-
static final String CONFIG_NAME = "token";
13+
public static final String CONFIG_NAME = "token";
1414
private static final String ENABLED = "enabled";
1515
private static final String APPLIED_PATH_PREFIXES = "appliedPathPrefixes";
1616

0 commit comments

Comments
 (0)