Skip to content

Commit 9e72313

Browse files
pendula95vietj
authored andcommitted
Only log Unsupported JWK when debug is enabled
1 parent b2aadfb commit 9e72313

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

vertx-auth-oauth2/src/main/java/io/vertx/ext/auth/oauth2/impl/OAuth2AuthProviderImpl.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ public OAuth2AuthProviderImpl(Vertx vertx, OAuth2Options config) {
7777
try {
7878
jwt.addJWK(new JWK(pubSecKey));
7979
} catch (RuntimeException e) {
80-
LOG.warn(String.format("Unsupported JWK %s", e.getMessage()));
80+
if (LOG.isDebugEnabled()) {
81+
LOG.warn("Unsupported JWK", e);
82+
}
8183
}
8284
}
8385
}
@@ -87,7 +89,9 @@ public OAuth2AuthProviderImpl(Vertx vertx, OAuth2Options config) {
8789
try {
8890
jwt.addJWK(new JWK(jwk));
8991
} catch (RuntimeException e) {
90-
LOG.warn(String.format("Unsupported JWK %s", e.getMessage()));
92+
if (LOG.isDebugEnabled()) {
93+
LOG.warn("Unsupported JWK", e);
94+
}
9195
}
9296
}
9397
}
@@ -136,7 +140,9 @@ public Future<Void> jWKSet() {
136140
try {
137141
jwt.addJWK(new JWK((JsonObject) key));
138142
} catch (Exception e) {
139-
LOG.warn(String.format("Unsupported JWK %s", e.getMessage()));
143+
if (LOG.isDebugEnabled()) {
144+
LOG.warn("Unsupported JWK", e);
145+
}
140146
}
141147
}
142148
// swap

0 commit comments

Comments
 (0)