Potiphar's wife accused Joseph of a crime he did not commit. Yet the authorities believed her version, and he went to jail. At that time, maybe quite a few people believed her version of events. Joseph, being a slave was powerless to defend himself. The authority and power was with Potiphar's wife because of the high position of her husband.
Yet God sees the truth. Now millions of people reading the Bible know that it was Joseph who was truthful. When you are walking with God, trust Him to vindicate you. What is written in the Bible is the truth and the truth is how God sees it. At some time God will let the truth be known about us, justify our view of things, and judge our accusers. In His time and wise way.
When Jesus was being tried for his 'crime' leading to his death on a cross, many people were against him. Many testified against him. Many were in power and authority. Even the crowds wanted Barabbas released and Jesus dead. There must have been a herd mentality whipped up by the scribes and others to get Jesus killed.
Yet God sees it another way. "Having disarmed the powers and authorities, he made a public spectacle of them, triumphing over them by the cross." Colossians 2:15. This is the opposite view to how the worldly saw it then. God viewed it as a victory for Jesus over the powers and authorities, contrary to what they were thinking at the time. Plus the long term significance for God and Christians is so huge that it's indescribable.
Jesus told a story about a widow who kept going to a judge to get vindication from her adversary. Through her constant requests, the judge granted her what she asked, because he tired of her. God also wants us to keep asking for vindication and justice relentlessly till we get it.
Jesus said "There is nothing hidden that will not be disclosed, and nothing concealed that will not be known or brought out into the open." Luke 8:17 Every action against you will be brought to light.
"Your hand will find out all your enemies; your right hand will find out those that hate you." Psalm 21:8 We have a right to know who our enemies are. The Holy Spirit should help us discern. It is in our best interests to know.
God will reward us for our trials just as he rewarded Jesus and Joseph. In every way we will be the final victors.