Naturally Joseph was given no opportunity to put his side of the story. Potiphar did not want to hear any other account of what took place, or else he had an unfaithful wife on his hands.
Joseph was in irons for some time, being tried by the Lord. Our outward blessings ebb and flow. We must never equate godliness with material gain, either in financial terms, or in some other respect. Sometimes Joseph was being strengthened, and others leaned on him, but at other times every prop seems to have been taken away. It is the same with our feelings. Sometimes we are lifted up, and that is good, but at other times God takes them away, and we must hold on by faith, and continue to love and trust the Lord.
So Joseph is falsely accused by the woman, just as Christ was falsely accused before Caiaphas and Pilate. In this, Joseph’s life continues to foreshadow that of Jesus Christ. No doubt Christ referred to this when he spoke to the disciples on the road to Emmaus. How amazing that all those years before, God had so perfectly planned the death of his Son. Has life grown more complex now, so that God is no longer able to know perfectly the end from the beginning? Certainly not.