Josephson effect in superconducting bridges - Microscopic theory