docs: @Override
  	public Set<JwkDefinition> convert(InputStream jwkSetSource) {
  		Set<JwkDefinition> jwkDefinitions;
  		JsonParser parser = null;
  
  		try {
  			parser = this.factory.createParser(jwkSetSource);
  
  			if (parser.nextToken() != JsonToken.START_OBJECT) {
  				throw new JwkException("Invalid JWK Set Object.");
  			}
  			if (parser.nextToken() != JsonToken.FIELD_NAME) {
  				throw new JwkException("Invalid JWK Set Object.");
  			}
  			if (!parser.getCurrentName().equals(KEYS)) {
  				throw new JwkException("Invalid JWK Set Object. The JWK Set MUST have a " + KEYS + " attribute.");
  			}
  			if (parser.nextToken() != JsonToken.START_ARRAY) {
  				throw new JwkException("Invalid JWK Set Object. The JWK Set MUST have an array of JWK(s).");
  			}
  
  			jwkDefinitions = new LinkedHashSet<JwkDefinition>();
  			Map<String, String> attributes = new HashMap<String, String>();
  
  			while (parser.nextToken() == JsonToken.START_OBJECT) {
  				attributes.clear();
  				while (parser.nextToken() == JsonToken.FIELD_NAME) {
  					String attributeName = parser.getCurrentName();
  					// gh-1082 - skip arrays such as x5c as we can't deal with them yet
  					if (parser.nextToken() == JsonToken.START_ARRAY) {
  						while (parser.nextToken() != JsonToken.END_ARRAY) {
  						}
  					} else {
  						attributes.put(attributeName, parser.getValueAsString());
  					}
  				}
  
  				// gh-1470 - skip unsupported public key use (enc) without discarding the entire set
  				JwkDefinition.PublicKeyUse publicKeyUse =
  						JwkDefinition.PublicKeyUse.fromValue(attributes.get(PUBLIC_KEY_USE));
  				if (JwkDefinition.PublicKeyUse.ENC.equals(publicKeyUse)) {
  					continue;
  				}
  			
  				JwkDefinition jwkDefinition = null;
  				JwkDefinition.KeyType keyType =
  						JwkDefinition.KeyType.fromValue(attributes.get(KEY_TYPE));
  				if (JwkDefinition.KeyType.RSA.equals(keyType)) {
  					jwkDefinition = this.createRsaJwkDefinition(attributes);
  				} else if (JwkDefinition.KeyType.EC.equals(keyType)) {
  					jwkDefinition = this.createEllipticCurveJwkDefinition(attributes);
  				}
  				if (jwkDefinition != null) {
  					if (!jwkDefinitions.add(jwkDefinition)) {
  						throw new JwkException("Duplicate JWK found in Set: " +
  								jwkDefinition.getKeyId() + " (" + KEY_ID + ")");
  					}
  				}
  			}
  
  		} catch (IOException ex) {
  			throw new JwkException("An I/O error occurred while reading the JWK Set: " + ex.getMessage(), ex);
  		} finally {
  			try {
  				if (parser != null) parser.close();
  			} catch (IOException ex) { }
  		}
  
  		return jwkDefinitions;
  	}