Commit 81ced9d2 authored by Matija Obreza's avatar Matija Obreza
Browse files

Fixed #3 - Application crash on invalid client secret

parent 9f7ba643
......@@ -243,9 +243,14 @@ public class SettingsDialog extends Dialog {
String verifierCode = vd.open(authorizationUrl).trim();
_log.info("Got verifier code: " + verifierCode);
if (StringUtils.isNotBlank(verifierCode)) {
try {
genesysClient.authenticate(verifierCode);
oauthSettings.setAccessToken(genesysClient.getAccessToken().getToken());
oauthSettings.setRefreshToken(genesysClient.getRefreshToken().getToken());
} catch (Throwable e1) {
_log.error(e1.getMessage(), e1);
SwtUtil.showMessageBox(getParent(), "OAuth error", e1.getMessage());
}
}
} catch (PleaseRetryException e) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment