Skip to content

Commit 02cef26

Browse files
committed
Fine-tuning
1 parent 9a06724 commit 02cef26

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

src/main/java/org/oidc/msg/AbstractMessage.java

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -341,16 +341,11 @@ public void fromJwt(String jwt, KeyJar keyJar, String keyOwner,
341341
*/
342342
@SuppressWarnings("unchecked")
343343
private void parseFromJwt(String jwt)
344-
throws IOException {
344+
throws IOException {
345345
String[] parts = MessageUtil.splitToken(jwt);
346-
String headerJson;
347-
String payloadJson;
348-
try {
349-
headerJson = StringUtils.newStringUtf8(Base64.decodeBase64(parts[0]));
350-
payloadJson = StringUtils.newStringUtf8(Base64.decodeBase64(parts[1]));
351-
} catch (ArrayIndexOutOfBoundsException | NullPointerException e) {
352-
throw new JWTDecodeException("Not able to locate header and payload for JWT", e);
353-
}
346+
String headerJson = StringUtils.newStringUtf8(Base64.decodeBase64(parts[0]));
347+
String payloadJson = StringUtils.newStringUtf8(Base64.decodeBase64(parts[1]));
348+
354349
this.header = mapper.readValue(headerJson, Map.class);
355350
this.claims = mapper.readValue(payloadJson, Map.class);
356351
}

0 commit comments

Comments
 (0)