Examples of ICredentials


Examples of org.apache.directory.studio.connection.core.ICredentials

                                Exception exception = new Exception( Messages.model__no_auth_handler );
                                monitor.setCanceled( true );
                                monitor.reportError( Messages.model__no_auth_handler, exception );
                                throw exception;
                            }
                            ICredentials credentials = authHandler.getCredentials( connection.getConnectionParameter() );
                            if ( credentials == null )
                            {
                                Exception exception = new Exception();
                                monitor.setCanceled( true );
                                monitor.reportError( Messages.model__no_credentials, exception );
                                throw exception;
                            }
                            if ( credentials.getBindPrincipal() == null || credentials.getBindPassword() == null )
                            {
                                Exception exception = new Exception( Messages.model__no_credentials );
                                monitor.reportError( Messages.model__no_credentials, exception );
                                throw exception;
                            }
                            bindPrincipal = credentials.getBindPrincipal();
                            bindPassword = credentials.getBindPassword();

                            // Simple Authentication
                            if ( connection.getConnectionParameter().getAuthMethod() == ConnectionParameter.AuthenticationMethod.SIMPLE )
                            {
                                BindRequest bindRequest = new BindRequestImpl();
View Full Code Here

Examples of org.apache.directory.studio.connection.core.ICredentials

                                Exception exception = new Exception( Messages.model__no_auth_handler );
                                monitor.setCanceled( true );
                                monitor.reportError( Messages.model__no_auth_handler, exception );
                                throw exception;
                            }
                            ICredentials credentials = authHandler.getCredentials( connection.getConnectionParameter() );
                            if ( credentials == null )
                            {
                                Exception exception = new Exception();
                                monitor.setCanceled( true );
                                monitor.reportError( Messages.model__no_credentials, exception );
                                throw exception;
                            }
                            if ( credentials.getBindPrincipal() == null || credentials.getBindPassword() == null )
                            {
                                Exception exception = new Exception( Messages.model__no_credentials );
                                monitor.reportError( Messages.model__no_credentials, exception );
                                throw exception;
                            }
                            bindPrincipal = credentials.getBindPrincipal();
                            bindPassword = credentials.getBindPassword();

                            // Simple Authentication
                            if ( connection.getConnectionParameter().getAuthMethod() == ConnectionParameter.AuthenticationMethod.SIMPLE )
                            {
                                BindRequest bindRequest = new BindRequestImpl();
View Full Code Here

Examples of org.apache.directory.studio.connection.core.ICredentials

            {
                NamingException namingException = new NamingException( Messages.model__no_auth_handler );
                monitor.reportError( Messages.model__no_auth_handler, namingException );
                throw namingException;
            }
            ICredentials credentials = authHandler.getCredentials( connection.getConnectionParameter() );
            if ( credentials == null )
            {
                CancelException cancelException = new CancelException();
                monitor.setCanceled( true );
                monitor.reportError( Messages.model__no_credentials, cancelException );
                throw cancelException;
            }
            if ( credentials.getBindPrincipal() == null || credentials.getBindPassword() == null )
            {
                NamingException namingException = new NamingException( Messages.model__no_credentials );
                monitor.reportError( Messages.model__no_credentials, namingException );
                throw namingException;
            }
            bindPrincipal = credentials.getBindPrincipal();
            bindCredentials = credentials.getBindPassword();

            InnerRunnable runnable = new InnerRunnable()
            {
                public void run()
                {
View Full Code Here

Examples of org.rssowl.core.connection.ICredentials

      e = e1;
    }

    assertNotNull(e);

    ICredentials credentials = new ICredentials() {
      public String getDomain() {
        return null;
      }

      public String getPassword() {
View Full Code Here

Examples of org.rssowl.core.connection.ICredentials

    URI feedUrl = new URI("http://www.rssowl.org/rssowl2dg/tests/connection/authrequired/feed_rdf.xml");
    IFeed feed = new Feed(feedUrl);

    DynamicDAO.save(feed);

    ICredentials authCreds = new ICredentials() {
      public String getDomain() {
        return null;
      }

      public String getPassword() {
View Full Code Here

Examples of org.rssowl.core.connection.ICredentials

   */
  @Override
  @SuppressWarnings( { "nls", "unused" })
  public ICredentials getAuthCredentials(URI link) {
    if (!fAuthDeleted && link.toString().equals("http://www.rssowl.org/rssowl2dg/tests/connection/authrequired/feed_rdf.xml"))
      return new ICredentials() {
        public String getUsername() {
          return "bpasero";
        }

        public String getPassword() {
View Full Code Here

Examples of org.rssowl.core.connection.ICredentials

        news.setInReplyTo(value.substring(0, endOfFirstId + 1));
    }
  }

  private void setupAuthentication(URI link, NNTPClient client) throws CredentialsException, IOException {
    ICredentials authCredentials = Owl.getConnectionService().getAuthCredentials(link);
    if (authCredentials != null)
      client.authenticate(authCredentials.getUsername(), authCredentials.getPassword());
  }
View Full Code Here

Examples of org.rssowl.core.connection.ICredentials

    /* User pressed OK Button */
    if (buttonId == IDialogConstants.OK_ID) {
      final String username = fUsername.getText();
      final String password = fPassword.getText();

      ICredentials credentials = new ICredentials() {
        public String getDomain() {
          return null;
        }

        public String getPassword() {
View Full Code Here

Examples of org.rssowl.core.connection.ICredentials

    return composite;
  }

  private void preload() {
    ICredentials authCredentials = null;
    try {

      /* First try with full URI */
      if (fCredProvider != null)
        authCredentials = fCredProvider.getAuthCredentials(fLink, fRealm);

      /* Second try with Host / Port / Realm */
      if (fCredProvider != null && fRealm != null && authCredentials == null)
        authCredentials = fCredProvider.getAuthCredentials(URIUtils.normalizeUri(fLink, true), fRealm);
    } catch (CredentialsException e) {
      Activator.getDefault().getLog().log(e.getStatus());
    }

    if (authCredentials != null) {
      String username = authCredentials.getUsername();
      String password = authCredentials.getPassword();

      if (StringUtils.isSet(username)) {
        fUsername.setText(username);
        fUsername.selectAll();
      }
View Full Code Here

Examples of org.rssowl.core.connection.ICredentials

      if (e.getRealm() == null)
        throw e;

      /* Try to load credentials using Host / Port / Realm */
      URI normalizedUri = URIUtils.normalizeUri(link, true);
      ICredentials authCredentials = Owl.getConnectionService().getAuthCredentials(normalizedUri, e.getRealm());

      /* Credentials based on Host / Port / Realm provided */
      if (authCredentials != null) {

        /* Store for plain URI too */
 
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.