/** {@inheritDoc} */
 @Override
 public void onGenerateGithubKeyClicked() {
   CurrentUser user = appContext.getCurrentUser();
   if (user != null && service.getSshKeyProviders().containsKey(GITHUB_HOST)) {
     generateGithubKey(user);
   } else {
     notificationManager.showError(constant.sshKeysProviderNotFound(GITHUB_HOST));
   }
 }
  private void generateGithubKey(CurrentUser user) {
    service
        .getSshKeyProviders()
        .get(GITHUB_HOST)
        .generateKey(
            user.getProfile().getId(),
            new AsyncCallback<Void>() {
              @Override
              public void onSuccess(Void result) {
                refreshKeys();
              }

              @Override
              public void onFailure(Throwable exception) {
                getFailedKey(GITHUB_HOST);
              }
            });
  }