public void Verify() { //Check userinfo hash var normalisedUserInfo = Util.NormalizeJson(userinfo); var userinfoHash = Base64Url.Encode(Util.Sha256Hash(Encoding.UTF8.GetBytes(normalisedUserInfo.ToString(Formatting.None)))); var expectedUserinfoHash = idToken["uih"].ToObject <string>(); if (userinfoHash.Equals(expectedUserinfoHash) == false) { throw new ValidationException("Unverified userinfo"); } // Check userinfo's claims checkerManager.Check(userinfo); }
/** * */ public void Verify() { checkerManager.Check(idToken); }