/** * Parses the optional X.509 certificate URL. * * @param o The JSON object to parse. Must not be {@code null}. * * @return The X.509 certificate URL, {@code null} if not specified. * * @throws ParseException If parsing failed. */ static URI parseX509CertURL(final JSONObject o) throws ParseException { if (o.containsKey("x5u")) { return JSONObjectUtils.getURI(o, "x5u"); } else { return null; } }
header = header.criticalParams(new HashSet<>(JSONObjectUtils.getStringList(jsonObject, name))); } else if("jku".equals(name)) { header = header.jwkURL(JSONObjectUtils.getURI(jsonObject, name)); } else if("jwk".equals(name)) { header = header.jwk(JWK.parse(JSONObjectUtils.getJSONObject(jsonObject, name))); } else if("x5u".equals(name)) { header = header.x509CertURL(JSONObjectUtils.getURI(jsonObject, name)); } else if("x5t".equals(name)) { header = header.x509CertThumbprint(new Base64URL(JSONObjectUtils.getString(jsonObject, name)));
header = header.criticalParams(new HashSet<>(JSONObjectUtils.getStringList(jsonObject, name))); } else if("jku".equals(name)) { header = header.jwkURL(JSONObjectUtils.getURI(jsonObject, name)); } else if("jwk".equals(name)) { header = header.jwk(JWK.parse(JSONObjectUtils.getJSONObject(jsonObject, name))); } else if("x5u".equals(name)) { header = header.x509CertURL(JSONObjectUtils.getURI(jsonObject, name)); } else if("x5t".equals(name)) { header = header.x509CertThumbprint(new Base64URL(JSONObjectUtils.getString(jsonObject, name)));