Former US President Barack Obama mounted a passionate defense of democracy in a speech in South Africa a day after his successor, Donald Trump, was heavily criticized for a humiliating news conference with Vladimir Putin.