The woman saith unto him, I know that Messias cometh, which is called Christ: when he is come, he will tell us all things.
 Jesus saith unto her, I that speak unto thee am he. . . .
 The woman then left her waterpot, and went her way into the city, and saith to the men,  Come, see a man, which told me all things that ever I did: is not this the Christ?The Samaritans had been expecting the Messiah to prove his identity by specific signs: by producing the ark of the covenant, the rod of Moses, and the omer of manna -- things that would prove that he was quite literally a "prophet like unto Moses" -- but the Samaritan woman said nothing about any of that. Her proof was simple: he "told me all things that ever I did: is not this the Christ?"
In John 1, it is strongly implied that the Jews, too, expected the Messiah to be someone who could tell them things no one else could know.
 Jesus saw Nathanael coming to him, and saith of him, Behold an Israelite indeed, in whom is no guile!
 Nathanael saith unto him, Whence knowest thou me?
Jesus answered and said unto him, Before that Philip called thee, when thou wast under the fig tree, I saw thee.
 Nathanael answered and saith unto him, Rabbi, thou art the Son of God; thou art the King of Israel.
 Jesus answered and said unto him, Because I said unto thee, I saw thee under the fig tree, believest thou? thou shalt see greater things than these.Jesus knew, apparently by supernormal means, Nathanael's character and whatever it was that happened to him under the fig tree -- and that was enough to prove to Nathanael that he was the Messiah.
Nowhere in the prophecies I looked at is there anything that says the Messiah will be distinguished by his supernormal knowledge or his ability to "tell us all things," and yet both Nathanael and the Samaritan woman seem to take this for granted as a sign of the Messiah.
There is of course a sense in which any sufficiently impressive miracle would show that Jesus was someone very special and thus perhaps the Messiah. We could easily imagine someone seeing him walk on water and concluding that he must be the Messiah, even in the absence of any specific prophecy that the Messiah would do anything like that. This perhaps suffices to explain Nathanael's reaction, but not that of the Samaritan woman, who said, "I know that Messias cometh, which is called Christ: when he is come, he will tell us all things." This implies a specific prophecy. No one would have said, for example, "I know that when Messias is come, he will walk on water."
Now my survey of Messianic prophecies was not exhaustive. As I have explained in other posts, I wanted to find those few prophecies that define the Messiah -- that tell us what the claim "I am the Messiah" means -- not every single Old Testament passage that might conceivably be about the Messiah. My first thought, then, was to go back and comb through the prophetic books once again looking for this elusive "tell us all things" prophecy -- but then I remembered that this was the expectation of a Samaritan, which makes things much simpler. The Samaritans' only prophet is Moses, their only scripture is the Torah, and their only Messianic prophecy is in the 18th chapter of Deuteronomy. Nothing Isaiah or Zechariah or any other Jewish prophet may have written is of any relevance.
Sure enough, that chapter turns out to be the probable source of this prophecy. Here is Deuteronomy 18:18 as it reads in the King James Version:
I [God] will raise them [Israel] up a Prophet from among their brethren, like unto thee [Moses], and will put my words in his mouth; and he shall speak unto them all that I shall command him.I propose that the bolded passage is the source of the prophecy alluded to by the Samaritan woman. English grammar requires that "that I shall command him" be a restrictive relative clause, so in English this cannot mean that the Prophet will tell them everything, but only everything-that-God-commands. But what if the distinction between restrictive and non-restrictive modifiers is less clear-cut in Hebrew than in English? What if the passage in question could also be translated as "he shall speak unto them all, as I shall command him"? If the relative clause does not restrict the scope of reference of the word "all," then here is our prophecy of a Messiah who "will tell us all things."
How grammatically defensible is this reading? Speaking as a linguist who is almost entirely ignorant of Hebrew, I have no idea. Setting those professional scruples to one side, though, and speaking as a Bible reader, I feel quite confident that the Samaritans simply must have read Deuteronomy this way. Where else could the prophecy have come from?