Examples of AuthenticationRequiredException


Examples of org.rssowl.core.connection.AuthenticationRequiredException

    }

    /* In case authentication required / failed */
    if (method.getStatusCode() == HTTP_ERROR_AUTH_REQUIRED) {
      AuthState hostAuthState = method.getHostAuthState();
      throw new AuthenticationRequiredException(hostAuthState != null ? hostAuthState.getRealm() : null, Activator.getDefault().createErrorStatus(Messages.DefaultProtocolHandler_ERROR_AUTHENTICATION_REQUIRED, null));
    }

    /* In case proxy-authentication required / failed */
    if (method.getStatusCode() == HTTP_ERROR_PROXY_AUTH_REQUIRED)
      throw new ProxyAuthenticationRequiredException(Activator.getDefault().createErrorStatus(Messages.DefaultProtocolHandler_ERROR_PROXY_AUTHENTICATION_REQUIRED, null));
View Full Code Here

Examples of org.rssowl.core.connection.AuthenticationRequiredException

    URI feedUrl2 = new URI("http://www.rssowl.org/rssowl2dg/tests/connection/authrequired/feed_rss_copy.xml");
    ICredentialsProvider credProvider = conManager.getCredentialsProvider(feedUrl1);

    IFeed feed1 = new Feed(feedUrl1);
    IFeed feed2 = new Feed(feedUrl2);
    AuthenticationRequiredException e = null;

    try {
      Owl.getConnectionService().getHandler(feed1.getLink()).openStream(feed1.getLink(), null, null);
    } catch (AuthenticationRequiredException e1) {
      e = e1;
View Full Code Here

Examples of org.rssowl.core.connection.AuthenticationRequiredException

  @SuppressWarnings("nls")
  public void testAuthCredentialProviderContribution() throws Exception {
    IConnectionService conManager = Owl.getConnectionService();
    URI feedUrl = new URI("http://www.rssowl.org/rssowl2dg/tests/connection/authrequired/feed_rdf.xml");
    IFeed feed = new Feed(feedUrl);
    AuthenticationRequiredException e = null;

    try {
      conManager.getCredentialsProvider(feedUrl).deleteProxyCredentials(feedUrl); //Disable Proxy
      Owl.getConnectionService().getHandler(feed.getLink()).openStream(feed.getLink(), null, null);
    } catch (AuthenticationRequiredException e1) {
View Full Code Here

Examples of org.rssowl.core.connection.AuthenticationRequiredException

            final Shell shell = getShell();
            if (shell != null && !shell.isDisposed()) {
              boolean locked = Controller.getDefault().getLoginDialogLock().tryLock();
              if (locked) {
                try {
                  final AuthenticationRequiredException authEx = (AuthenticationRequiredException) e;
                  JobRunner.runSyncedInUIThread(shell, new Runnable() {
                    public void run() {
                      try {

                        /* Return on Cancelation or shutdown or deletion */
                        if (monitor.isCanceled() || Controller.getDefault().isShuttingDown())
                          return;

                        /* Credentials might have been provided meanwhile in another dialog */
                        try {
                          URI normalizedUri = URIUtils.normalizeUri(link, true);
                          if (Owl.getConnectionService().getAuthCredentials(normalizedUri, authEx.getRealm()) != null) {
                            importFromOnlineResource(link);
                            showError[0] = false;
                            return;
                          }
                        } catch (CredentialsException exe) {
                          Activator.getDefault().getLog().log(exe.getStatus());
                        }

                        /* Show Login Dialog */
                        LoginDialog login = new LoginDialog(shell, link, authEx.getRealm());
                        if (login.open() == Window.OK && !monitor.isCanceled() && !Controller.getDefault().isShuttingDown()) {
                          importFromOnlineResource(link);
                          showError[0] = false;
                        }
                      } catch (InvocationTargetException e) {
View Full Code Here

Examples of org.rssowl.core.connection.AuthenticationRequiredException

      throw new ConnectionException(Activator.getDefault().createErrorStatus(e.getMessage(), e));
    }

    /* In case authentication required / failed */
    if (getMethod.getStatusCode() == HTTP_ERROR_AUTH_REQUIRED)
      throw new AuthenticationRequiredException(Activator.getDefault().createErrorStatus("Authentication required!", null)); //$NON-NLS-1$

    /* In case proxy-authentication required / failed */
    if (getMethod.getStatusCode() == HTTP_ERROR_PROXY_AUTH_REQUIRED)
      throw new ProxyAuthenticationRequiredException(Activator.getDefault().createErrorStatus("Proxy-Authentication required!", null)); //$NON-NLS-1$

View Full Code Here

Examples of org.rssowl.core.connection.AuthenticationRequiredException

    ConnectionManager conManager = ConnectionManager.getDefault();
    ICredentialsProvider credProvider = conManager.getCredentialsProvider();

    URL feedUrl = new URL("http://www.rssowl.org/rssowl2dg/tests/connection/authrequired/feed_rss.xml");
    IFeed feed = new Feed(feedUrl);
    AuthenticationRequiredException e = null;

    try {
      conManager.load(feed.getLink());
    } catch (AuthenticationRequiredException e1) {
      e = e1;
View Full Code Here

Examples of org.rssowl.core.connection.AuthenticationRequiredException

  @SuppressWarnings("nls")
  public void testCredentialProviderContribution() throws Exception {
    ConnectionManager conManager = ConnectionManager.getDefault();
    URL feedUrl = new URL("http://www.rssowl.org/rssowl2dg/tests/connection/authrequired/feed_rdf.xml");
    IFeed feed = new Feed(feedUrl);
    AuthenticationRequiredException e = null;

    try {
      conManager.load(feed.getLink());
    } catch (AuthenticationRequiredException e1) {
      e = e1;
View Full Code Here

Examples of org.rssowl.core.connection.AuthenticationRequiredException

        /* Only one Login Dialog at the same time */
        if (shellAr[0] != null && !shellAr[0].isDisposed()) {
          fLoginDialogLock.lock();
          try {
            final AuthenticationRequiredException authEx = (AuthenticationRequiredException) e;
            JobRunner.runSyncedInUIThread(shellAr[0], new Runnable() {
              public void run() {

                /* Return on Cancelation or shutdown or deletion */
                if (!shouldProceedReloading(monitor, bookmark))
                  return;

                /* Credentials might have been provided meanwhile in another dialog */
                try {
                  URI normalizedUri = URIUtils.normalizeUri(feedLink, true);
                  if (Owl.getConnectionService().getAuthCredentials(normalizedUri, authEx.getRealm()) != null) {
                    reloadQueued(bookmark, shellAr[0]);
                    return;
                  }
                } catch (CredentialsException exe) {
                  Activator.getDefault().getLog().log(exe.getStatus());
                }

                /* Show Login Dialog */
                LoginDialog login = new LoginDialog(shellAr[0], feedLink, authEx.getRealm());
                if (login.open() == Window.OK && shouldProceedReloading(monitor, bookmark)) {

                  /* Store info about Realm in Bookmark */
                  if (StringUtils.isSet(authEx.getRealm())) {
                    bookmark.setProperty(BM_REALM_PROPERTY, authEx.getRealm());
                    fBookMarkDAO.save(bookmark);
                  }

                  /* Re-Reload Bookmark */
                  reloadQueued(bookmark, shellAr[0]);
                }

                /* Update Error Flag if user hit Cancel */
                else if (shouldProceedReloading(monitor, bookmark) && !bookmark.isErrorLoading()) {
                  bookmark.setErrorLoading(true);
                  if (StringUtils.isSet(authEx.getMessage()))
                    bookmark.setProperty(LOAD_ERROR_KEY, authEx.getMessage());
                  fBookMarkDAO.save(bookmark);
                }
              }
            });

View Full Code Here

Examples of org.rssowl.core.connection.AuthenticationRequiredException

      try {
        Owl.getConnectionService().getCredentialsProvider(link).deleteAuthCredentials(link, null);
      } catch (CredentialsException e) {
        Activator.log(e);
      }
      throw new AuthenticationRequiredException(null, Activator.createErrorStatus(Messages.NewsGroupHandler_ERROR_AUTH_REQUIRED, null));
    }
  }
View Full Code Here

Examples of org.rssowl.core.connection.AuthenticationRequiredException

            final Shell shell = getShell();
            if (shell != null && !shell.isDisposed()) {
              boolean locked = Controller.getDefault().getLoginDialogLock().tryLock();
              if (locked) {
                try {
                  final AuthenticationRequiredException authEx = (AuthenticationRequiredException) e;
                  JobRunner.runSyncedInUIThread(shell, new Runnable() {
                    public void run() {
                      try {

                        /* Return on Cancelation or shutdown or deletion */
                        if (monitor.isCanceled() || Controller.getDefault().isShuttingDown())
                          return;

                        /* Credentials might have been provided meanwhile in another dialog */
                        try {
                          URI normalizedUri = URIUtils.normalizeUri(link, true);
                          if (Owl.getConnectionService().getAuthCredentials(normalizedUri, authEx.getRealm()) != null) {
                            importFromOnlineResource(link);
                            showError[0] = false;
                            return;
                          }
                        } catch (CredentialsException exe) {
                          Activator.getDefault().getLog().log(exe.getStatus());
                        }

                        /* Show Login Dialog */
                        LoginDialog login = new LoginDialog(shell, link, authEx.getRealm());
                        if (login.open() == Window.OK && !monitor.isCanceled() && !Controller.getDefault().isShuttingDown()) {
                          importFromOnlineResource(link);
                          showError[0] = false;
                        }
                      } catch (InvocationTargetException e) {
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.