}
// check parameters
final String clientId = params.get(constants.getApplicationClientId());
if (clientId == null) {
result.add(new InvalidProperty(constants.getApplicationClientId(), "Missing the application client id"));
}
final String clientSecret = params.get(constants.getApplicationClientSecret());
if (clientSecret == null) {
result.add(new InvalidProperty(constants.getApplicationClientSecret(), "Missing the application client secret"));
}
final String applicationOAuthCode = params.get(constants.getApplicationOauthCode());
if (applicationOAuthCode == null) {
result.add(new InvalidProperty(constants.getApplicationOauthCode(), "Missing the application oauth code"));
}
// get the refresh and access token
if (result.isEmpty()) {
handleTokens(params);