Examples of AuthenticationRequiredException


Examples of org.apache.maven.continuum.web.exception.AuthenticationRequiredException

    protected void checkManageSchedulesAuthorization()
        throws AuthenticationRequiredException, AuthorizationRequiredException
    {
        if ( !isAuthenticated() )
        {
            throw new AuthenticationRequiredException( "Authentication required." );
        }

        checkAuthorization( ContinuumRoleConstants.CONTINUUM_MANAGE_SCHEDULES );
    }
View Full Code Here

Examples of org.apache.maven.continuum.web.exception.AuthenticationRequiredException

    protected void checkManageConfigurationAuthorization()
        throws AuthenticationRequiredException, AuthorizationRequiredException
    {
        if ( !isAuthenticated() )
        {
            throw new AuthenticationRequiredException( "Authentication required." );
        }

        checkAuthorization( ContinuumRoleConstants.CONTINUUM_MANAGE_CONFIGURATION );
    }
View Full Code Here

Examples of org.apache.maven.continuum.web.exception.AuthenticationRequiredException

    protected void checkManageSchedulesAuthorization()
        throws AuthenticationRequiredException, AuthorizationRequiredException
    {
        if ( !isAuthenticated() )
        {
            throw new AuthenticationRequiredException( "Authentication required." );
        }

        checkAuthorization( ContinuumRoleConstants.CONTINUUM_MANAGE_SCHEDULES );
    }
View Full Code Here

Examples of org.apache.maven.continuum.web.exception.AuthenticationRequiredException

    protected void checkManageQueuesAuthorization()
        throws AuthenticationRequiredException, AuthorizationRequiredException
    {
        if ( !isAuthenticated() )
        {
            throw new AuthenticationRequiredException( "Authentication required" );
        }
       
        checkAuthorization( ContinuumRoleConstants.CONTINUUM_MANAGE_QUEUES );
    }
View Full Code Here

Examples of org.cyclop.model.exception.AuthenticationRequiredException

    }
  }

  private void checkAuthenticated() {
    if (!isOpen()) {
      throw new AuthenticationRequiredException("Cassandra session not found");
    }
  }
View Full Code Here

Examples of org.rssowl.core.connection.AuthenticationRequiredException

    IConnectionService conManager = Owl.getConnectionService();
    URI feedUrl = new URI("http://www.rssowl.org/rssowl2dg/tests/connection/authrequired/feed_rss.xml");
    ICredentialsProvider credProvider = conManager.getCredentialsProvider(feedUrl);

    IFeed feed = new Feed(feedUrl);
    AuthenticationRequiredException e = null;

    try {
      new DefaultProtocolHandler().openStream(feed.getLink(), 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
      new DefaultProtocolHandler().openStream(feed.getLink(), null);
    } catch (AuthenticationRequiredException e1) {
View Full Code Here

Examples of org.rssowl.core.connection.AuthenticationRequiredException

    }
  }

  private void checkAuthenticationRequired(NNTPClient client) throws AuthenticationRequiredException {
    if (client.getReplyCode() == STATUS_AUTH_REQUIRED || client.getReplyCode() == STATUS_AUTH_REQUIRED_ALTERNATIVE)
      throw new AuthenticationRequiredException(Activator.getDefault().createErrorStatus("Authentication required!", null)); //$NON-NLS-1$
  }
View Full Code Here

Examples of org.rssowl.core.connection.AuthenticationRequiredException

      if (e instanceof AuthenticationRequiredException && shell != null && !shell.isDisposed() && !fShuttingDown) {

        /* Only one Login Dialog at the same time */
        fLoginDialogLock.lock();
        try {
          final AuthenticationRequiredException authEx = (AuthenticationRequiredException) e;
          JobRunner.runSyncedInUIThread(shell, new Runnable() {
            public void run() {

              /* Check for shutdown flag and return if required */
              if (fShuttingDown || monitor.isCanceled())
                return;

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

              /* Show Login Dialog */
              LoginDialog login = new LoginDialog(shell, feedLink, authEx.getRealm());
              if (login.open() == Window.OK && !fShuttingDown)
                reloadQueued(bookmark, shell);

              /* Update Error Flag if user hit Cancel */
              else if (!fShuttingDown && !monitor.isCanceled() && !bookmark.isErrorLoading()) {
View Full Code Here

Examples of org.rssowl.core.connection.AuthenticationRequiredException

          if (userInitiated && e instanceof AuthenticationRequiredException && !monitor.isCanceled() && !Controller.getDefault().isShuttingDown()) {
            final Shell shell = OwlUI.getActiveShell();
            if (shell != null && !shell.isDisposed()) {
              Controller.getDefault().getLoginDialogLock().lock();
              try {
                final AuthenticationRequiredException authEx = (AuthenticationRequiredException) e;
                JobRunner.runSyncedInUIThread(shell, new Runnable() {
                  public void run() {

                    /* 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) {
                        fDownloadQueue.schedule(new AttachmentDownloadTask(attachment, link, fileName, folder, userInitiated));
                        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()) {
                      fDownloadQueue.schedule(new AttachmentDownloadTask(attachment, link, fileName, folder, userInitiated));
                      showError[0] = false;
                    }
                  }
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.