Skip to content

Commit

Permalink
Added Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Kanapriya committed Oct 11, 2018
1 parent fe68502 commit 3c9660b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion repository/esb-connector-gmail.properties
Expand Up @@ -3,7 +3,6 @@ userId=connectortesting1@gmail.com
clientId=1074495689053-2dhlv9dsdsdsd85p3s3vv5lphpsh.apps.googleusercontent.com
clientSecret=IHlw_lS0u0em43Al2Rsdsds9xyDdE
refreshToken=1/aP8na7LgKmUdsyGOwg7VyniFpMvVItUdDgdEaJY
accessToken=ya29.sdd-_7-fZPKoTxu1LPsF7cHUDmfUV8zmm0-O9RKQEY3G6tqLwuFs5tlv4YlSGJZql6kjgi1yh-F_UiWJrHtG1tR
apiVersion=v1
to=xxxxxxxxx@gmail.com
from=connectortesting1@gmail.com
Expand Down
1 change: 0 additions & 1 deletion src/test/INTEGRATION-TEST.txt
Expand Up @@ -19,7 +19,6 @@ STEPS:
3. Update the esb-connector-gmail.properties file at location "{Connector_Home}/repository with following information.
- Update the refreshToken, clientId, clientSecret, grantType values.
- userId : give your e-mail address
- accessToken : obtained access token

4. Update connector properties file "gmail.properties" located in "GMAIL_REST_HOME/src/test/resources/artifacts/ESB/connector/config/",
If you wanted to change the default value according to your gmail account.
Expand Down
Expand Up @@ -53,12 +53,12 @@ public void setEnvironment() throws Exception {
+ connectorProperties.getProperty("refreshToken");
RestResponse<JSONObject> apiRestResponse = sendJsonRestRequest(apiEndpoint, "POST", apiRequestHeadersMap);
String accessToken = apiRestResponse.getBody().get("access_token").toString();
connectorProperties.put("access_Token", accessToken);
connectorProperties.put("accessToken", accessToken);
connectorProperties.put("labelNameMandatory", connectorProperties.getProperty("labelNameMandatory") +
System.currentTimeMillis());
connectorProperties.put("labelNameOptional", connectorProperties.getProperty("labelNameOptional") +
System.currentTimeMillis());
String authorization = connectorProperties.getProperty("access_Token");
String authorization = connectorProperties.getProperty("accessToken");
apiRequestHeadersMap.put("Authorization", "Bearer " + authorization);
apiRequestHeadersMap.putAll(esbRequestHeadersMap);
}
Expand Down

0 comments on commit 3c9660b

Please sign in to comment.