Implement client credentials exchange with tests