}
};
}
protected void handleTokens(Map<String, String> params) {
final GoogleClientSecrets secrets = new GoogleClientSecrets().setInstalled(
new GoogleClientSecrets.Details().
setClientId(params.get(constants.getApplicationClientId())).
setClientSecret(params.get(constants.getApplicationClientSecret()))
);
try {
final GoogleTokenResponse tokenResponse = new GoogleAuthorizationCodeTokenRequest(
this.httpTransport,
this.jsonFactory,
secrets.getDetails().getClientId(),
secrets.getDetails().getClientSecret(),
params.get(constants.getApplicationOauthCode()),
constants.getRedirectUri()
).execute();
params.put(constants.getApplicationRefreshToken(), tokenResponse.getRefreshToken());