Examples of ICredentials


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

      try {
        URI siteUri = new URI(site);
        ICredentialsProvider credentialsProvider = Owl.getConnectionService().getCredentialsProvider(siteUri);
        if (credentialsProvider != null) {
          credentialsProvider.setAuthCredentials(new ICredentials() {
            public String getUsername() {
              return username;
            }

            public String getPassword() {
View Full Code Here

Examples of org.rssowl.core.connection.ICredentials

  private CredentialsModelData loadCredentials(URI link, String realm) throws CredentialsException {
    if (StringUtils.isSet(link.getScheme())) {
      ICredentialsProvider credentialsProvider = fConService.getCredentialsProvider(link);
      if (credentialsProvider != null) {
        ICredentials authCredentials = credentialsProvider.getAuthCredentials(link, realm);
        if (authCredentials != null)
          return new CredentialsModelData(authCredentials.getUsername(), authCredentials.getPassword(), link, realm);
      }
    }

    return null;
  }
View Full Code Here

Examples of org.rssowl.core.connection.ICredentials

    String getRealm() {
      return fRealm;
    }

    ICredentials toCredentials() {
      return new ICredentials() {
        public String getDomain() {
          return ""; //$NON-NLS-1$
        }

        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, null);
    if (authCredentials != null)
      client.authenticate(authCredentials.getUsername(), authCredentials.getPassword());
  }
View Full Code Here

Examples of org.rssowl.core.connection.ICredentials

            canceled = true;
            return;
          }

          /* Obtain Google Account Credentials */
          ICredentials credentials = Owl.getConnectionService().getAuthCredentials(URI.create(SyncUtils.GOOGLE_LOGIN_URL), null);
          if (credentials == null) {
            canceled = true;
            return;
          }

          /* Obtain Auth Token */
          String googleAuthToken = SyncUtils.getGoogleAuthToken(credentials.getUsername(), credentials.getPassword(), true, monitor);

          /* Return on Cancellation */
          if (monitor.isCanceled() || Controller.getDefault().isShuttingDown()) {
            canceled = true;
            return;
View Full Code Here

Examples of org.rssowl.core.connection.ICredentials

      try {
        URI siteUri = new URI(site);
        ICredentialsProvider credentialsProvider = Owl.getConnectionService().getCredentialsProvider(siteUri);
        if (credentialsProvider != null) {
          credentialsProvider.setAuthCredentials(new ICredentials() {
            public String getUsername() {
              return username;
            }

            public String getPassword() {
View Full Code Here

Examples of org.rssowl.core.connection.ICredentials

  private CredentialsModelData loadCredentials(URI link, String realm) throws CredentialsException {
    if (StringUtils.isSet(link.getScheme())) {
      ICredentialsProvider credentialsProvider = fConService.getCredentialsProvider(link);
      if (credentialsProvider != null) {
        ICredentials authCredentials = credentialsProvider.getPersistedAuthCredentials(link, realm);
        if (authCredentials != null)
          return new CredentialsModelData(authCredentials.getUsername(), authCredentials.getPassword(), link, realm);
      }
    }

    return null;
  }
View Full Code Here

Examples of org.rssowl.core.connection.ICredentials

    String getRealm() {
      return fRealm;
    }

    ICredentials toCredentials() {
      return new ICredentials() {
        public String getDomain() {
          return ""; //$NON-NLS-1$
        }

        public String getPassword() {
View Full Code Here

Examples of org.rssowl.core.connection.ICredentials

        fPreferences.putBoolean(DefaultPreferences.REMEMBER_PASSWORD, rememberPassword);

      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
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.