Examples of AuthenticationError


Examples of com.google.api.ads.dfp.v201306.AuthenticationError

    try {
      makeApiRequest(user);
    } catch (ApiException e) {
      for (ApiError error : e.getErrors()) {
        if (error instanceof AuthenticationError) {
          AuthenticationError authError = (AuthenticationError) error;
          if (authError.getReason() == AuthenticationErrorReason.INVALID_EMAIL) {
            // Try to regenerate auth token here again in case it expired.
            user.setAuthToken(authToken.getAuthToken());
            makeApiRequest(user);
          } else {
            System.err.println("Service call failed for authentication reason: "
                + authError.getReason());
          }
        }
      }
    }
  }
View Full Code Here

Examples of com.google.api.adwords.v201306.cm.AuthenticationError

    try {
      makeApiRequest(user);
    } catch (ApiException e) {
      for (ApiError error : e.getErrors()) {
        if (error instanceof AuthenticationError) {
          AuthenticationError authError = (AuthenticationError) error;
          if (authError.getReason() == AuthenticationErrorReason.GOOGLE_ACCOUNT_COOKIE_INVALID) {
            // Try to regenerate auth token here again in case it expired.
            user.setAuthToken(authToken.getAuthToken());
            makeApiRequest(user);
          } else {
            System.err.println("Service call failed for authentication reason: "
                + authError.getReason());
          }
        }
      }
    }
  }
View Full Code Here

Examples of org.aavso.tools.vstar.exception.AuthenticationError

            retrieveObserverCode(userResults.getInt("uid"));
          }
        }
      } catch (SQLException e) {
        throw new AuthenticationError(e.getLocalizedMessage());
      }
    }

    return authenticated;
  }
View Full Code Here

Examples of org.aavso.tools.vstar.exception.AuthenticationError

              authenticators, username, password);

          task.execute();
          authenticated = task.get();
        } catch (ExecutionException e) {
          throw new AuthenticationError(e.getLocalizedMessage());
        } catch (InterruptedException e) {
          // Nothing to do.
        } finally {
          Mediator.getUI().setCursor(null);
        }

        if (!authenticated) {
          retries--;
        }
      }
    }

    Mediator.getUI().getStatusPane().setMessage("");

    if (cancelled) {
      throw new CancellationException();
    }

    if (!authenticated) {
      throw new AuthenticationError("Unable to authenticate.");
    }
  }
View Full Code Here

Examples of org.aavso.tools.vstar.exception.AuthenticationError

        Authenticator.getInstance().authenticate();

        if (!obSourcePlugin
            .additionalAuthenticationSatisfied(ResourceAccessor
                .getLoginInfo())) {
          throw new AuthenticationError(
              "Plug-in authentication failed");
        }
      }

      createObservationArtefacts();
View Full Code Here

Examples of org.aavso.tools.vstar.exception.AuthenticationError

        authenticated = true;
        ResourceAccessor.getLoginInfo().setUserName(username);
        ResourceAccessor.getLoginInfo().setType(getLoginType());
      } else {
        String message = "Authentication failed";
        throw new AuthenticationError(message);
      }

      processResponse(conn);

    } catch (MalformedURLException e) {
View Full Code Here

Examples of org.aavso.tools.vstar.exception.AuthenticationError

            retrieveUserInfo(username);
          }
        }
      } catch (SQLException e) {
        throw new AuthenticationError(e.getLocalizedMessage());
      }
    }

    return authenticated;
  }
View Full Code Here

Examples of org.zanata.webtrans.shared.auth.AuthenticationError

        } catch (ActionException e) {
            ctx.rollback();
            throw e;
        } catch (NotLoggedInException e) {
            ctx.rollback();
            throw new AuthenticationError(e);
        } catch (AuthorizationException e) {
            ctx.rollback();
            throw new AuthorizationError(e);
        } catch (Throwable e) {
            ctx.rollback();
View Full Code Here

Examples of org.zanata.webtrans.shared.auth.AuthenticationError

        } catch (ActionException e) {
            ctx.rollback();
            throw e;
        } catch (NotLoggedInException e) {
            ctx.rollback();
            throw new AuthenticationError(e);
        } catch (AuthorizationException e) {
            ctx.rollback();
            throw new AuthorizationError(e);
        } catch (Throwable e) {
            ctx.rollback();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.