Ruby: added the refresh token logic for client credentials