"Article II, section 2 of the Constitution provides an exception to the general rule of Senate confirmation, giving the president the power "to fill up all vacancies that may happen during the recess of the Senate," by granting temporary commissions.
Obama isn't the first president to invoke that exception where it doesn't apply, ramming through nominees that the Senate refuses to confirm. But he is the first to do it when the Senate is actually in session."
"pro forma session - A brief meeting (sometimes only several seconds) of the Senate in which no business is conducted. It is held usually to satisfy the constitutional obligation that neither chamber can adjourn for more than three days without the consent of the other."
The Senate was currently in pro forma session when Obama attempted to appoint Richard Cordray to the consumer watchdog agency provided in the Dodd-Frank bill, which means they were not in recess, and thus the Recess Appointment Clause in Article II Section 2 of the Constitution does not pertain to this situation.