       (throw (IllegalArgumentException. "invalid assertion, origin url mismatch")))))
 
 (defmethod verify-assertion :v2.0 [url asr]
+  (ping-related asr)
   (let [kind (get-in asr [:verify :type] (get-in asr [:verification :type]))]
     (when (and (not (nil? url)) (or (= kind "hosted") (= kind "HostedBadge")))
       (if (and (not (string/starts-with? url (:id asr))) (not= (domain url) (domain (:id asr))))


;;;

(defmulti verify-assertion assertion-version)

(defmethod verify-assertion :v0.5.0 [url asr]

      (throw (IllegalArgumentException. "invalid assertion, verify url mismatch"))))
  (if (not= (domain (get-in asr [:verify :url])) (domain (:badge asr)))
    (throw (IllegalArgumentException. "invalid assertion, verify url mismatch"))))


(defn assertion->badge
  ([user assertion] (assertion->badge user assertion {}))
