Skip to content

Commit

Permalink
Spotless apply Jenkins fix
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Crawford <[email protected]>
  • Loading branch information
stephen-crawford committed Dec 21, 2022
1 parent 9fd9d7a commit 9682a84
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,7 @@ private static void validateSignatureAlgorithm(JsonWebKey key, JwtToken jwt) thr
SignatureAlgorithm tokenAlgorithm = SignatureAlgorithm.getAlgorithm(jwt.getJwsHeaders().getAlgorithm());

if (!keyAlgorithm.equals(tokenAlgorithm)) {
throw new RuntimeException(
"Algorithm of JWT does not match algorithm of JWK (" + keyAlgorithm + " != " + tokenAlgorithm + ")"
);
throw new RuntimeException("Algorithm of JWT does not match algorithm of JWK (" + keyAlgorithm + " != " + tokenAlgorithm + ")");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,3 @@ public void testShouldReturnNullWhenExtractingNullToken() throws RuntimeExceptio
MatcherAssert.assertThat(shiroAuthToken, nullValue());
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public void testClusterHealthWithInvalidBearerAuthenticationHeader() throws IOEx
request.setOptions(options);
Response response = OpenSearchRestTestCase.client().performRequest(request);
// Should be unauthorized because created with a different signing algorithm
// Current implementation allows a unauthorized request to pass
// Current implementation allows a unauthorized request to pass
try {
OpenSearchRestTestCase.client().performRequest(request);
} catch (ResponseException e) {
Expand Down

0 comments on commit 9682a84

Please sign in to comment.