You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In file net.oauth.jsontoken.discovery.UrlBasedVerifierProvider.java, method
public List<Verifier> findVerifier(String issuer, String keyId)
52 do {
53 line = buff.readLine();
54 content.append(line + "\n");
55 } while (line != null);
57 JsonParser parser = new JsonParser();
58 JsonObject jsonObject =
parser.parse(content.toString()).getAsJsonObject();
When code reads certificates by fetching from URL which expects simple json
format, for example:
{"keyid":"x509 certificate in Pem format", "keyid2":"x509 certificate in Pem format"..},
code at 52-55 appends null at the end of json.
When code 57-58 parses that json, it gives following error:
com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true)
to accept malformed JSON at line 2 column 2 path $
Solution:
Before appending line to content, make a check if(line != null)
do {
line = buff.readLine();
if(line != null)
content.append(line + "\n");
} while (line != null);
Original issue reported on code.google.com by abg326...@gmail.com on 3 Aug 2015 at 8:10
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
abg326...@gmail.com
on 3 Aug 2015 at 8:10The text was updated successfully, but these errors were encountered: