code: public void refreshToken() throws OAuthSystemException, OAuthProblemException {
  		cleanError();
  		if (accessToken == null || refreshToken == null) {
  			throw new OAuthRuntimeException("Access token ot Refresh token not provided");
  		}
  
  		OneloginURLConnectionClient httpClient = new OneloginURLConnectionClient();
  		OAuthClientRequest request = OAuthClientRequest
  			.tokenLocation(settings.getURL(Constants.TOKEN_REFRESH_URL))
  			.buildBodyMessage();
  
  		Map<String, String> headers = new HashMap<String, String>();
  		headers.put(OAuth.HeaderType.CONTENT_TYPE, OAuth.ContentType.JSON);
  		headers.put("User-Agent", this.userAgent);
  
  		Map<String, Object> params = new HashMap<String, Object>();
  		params.put("grant_type", GrantType.REFRESH_TOKEN);
  		params.put("access_token", accessToken);
  		params.put("refresh_token", refreshToken);
  		String body = JSONUtils.buildJSON(params);
  		request.setBody(body);
  
  		updateTokens(httpClient, request, headers);
  	}
docs: Refreshing tokens provides a new set of access and refresh tokens.
  
  @throws OAuthSystemException - if there is a IOException reading parameters of the httpURLConnection
  @throws OAuthProblemException - if there are errors validating the OneloginOAuthJSONAccessTokenResponse and throwOAuthProblemException is enabled
  
  @see <a target="_blank" href="https://developers.onelogin.com/api-docs/1/oauth20-tokens/refresh-tokens">Refresh Tokens documentation</a>