The FBI foiled a plan by a 23-year-old man to detonate a bomb at a bank in Oklahoma City over dissatisfaction with the government, court documents indicate.