diff --git a/src/LitJWT/JwtDecoder.cs b/src/LitJWT/JwtDecoder.cs index fa7c989..3e06905 100644 --- a/src/LitJWT/JwtDecoder.cs +++ b/src/LitJWT/JwtDecoder.cs @@ -215,8 +215,6 @@ public DecodeResult TryDecode(ReadOnlySpan utf8token, PayloadParser var reader = new System.Text.Json.Utf8JsonReader(decodedPayload); while (reader.Read()) { - if (reader.TokenType == System.Text.Json.JsonTokenType.EndObject) break; - if (reader.CurrentDepth == 1 && reader.TokenType == JsonTokenType.PropertyName) { if (reader.ValueTextEquals(JwtConstantsUtf8.Expiration)) @@ -358,8 +356,6 @@ public DecodeResult TryDecode(ReadOnlySpan token, PayloadParser payl var reader = new System.Text.Json.Utf8JsonReader(decodedPayload); while (reader.Read()) { - if (reader.TokenType == System.Text.Json.JsonTokenType.EndObject) break; - if (reader.CurrentDepth == 1 && reader.TokenType == JsonTokenType.PropertyName) { if (reader.ValueTextEquals(JwtConstantsUtf8.Expiration)) @@ -514,8 +510,6 @@ DecodeResult TryDecodeCore(ReadOnlySpan utf8token, InternalPayloadParse var reader = new System.Text.Json.Utf8JsonReader(decodedPayload); while (reader.Read()) { - if (reader.TokenType == System.Text.Json.JsonTokenType.EndObject) break; - if (reader.CurrentDepth == 1 && reader.TokenType == JsonTokenType.PropertyName) { if (reader.ValueTextEquals(JwtConstantsUtf8.Expiration)) @@ -652,8 +646,6 @@ DecodeResult TryDecodeCore(ReadOnlySpan token, InternalPayloadParser var reader = new System.Text.Json.Utf8JsonReader(decodedPayload); while (reader.Read()) { - if (reader.TokenType == System.Text.Json.JsonTokenType.EndObject) break; - if (reader.CurrentDepth == 1 && reader.TokenType == JsonTokenType.PropertyName) { if (reader.ValueTextEquals(JwtConstantsUtf8.Expiration))