The man who set off an explosive device in Ansbach was a Syrian migrant denied asylum says Bavarian Interior Minister.