John 7:18
He that speaketh from himself seeketh his own glory: but he that seeketh the glory of him that sent him, the same is true,—One reason by which he will know the truth is of God is that he who speaks from himself as the author of his teaching seeks his own glory. In doing the will of God it will be so manifest that there is such a complete self-denial and glorification of God that he will know that the teaching did not originate with man.
and no unrighteousness is in him.—The one who denies self and seeks the glory of him sending him gives undeniable testimony that he did not originate his teaching, and that he is righteous.