Package org.rssowl.core.connection.auth

Examples of org.rssowl.core.connection.auth.IProxyCredentials


   * @throws CredentialsException In case of an error while retrieving Proxy
   * Credentials.
   */
  public IProxyCredentials getProxyCredentials(URL url) throws CredentialsException {
    if (fCredentialsProvider != null) {
      IProxyCredentials credentials = fCredentialsProvider.getProxyCredentials(url);
      if (credentials != null)
        return credentials;
    }
    return null;
  }
View Full Code Here


  public void testProxyCredentialProvider() 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);

    IProxyCredentials proxyCredentials = conManager.getProxyCredentials(feed.getLink());

    assertEquals("", proxyCredentials.getDomain());
    assertEquals("bpasero", proxyCredentials.getUsername());
    assertEquals("admin", proxyCredentials.getPassword());
    assertEquals("127.0.0.1", proxyCredentials.getHost());
    assertEquals(0, proxyCredentials.getPort());
  }
View Full Code Here

   * @see org.rssowl.core.connection.auth.ICredentialsProvider#getProxyCredentials(java.net.URL)
   */
  @SuppressWarnings( { "unused", "nls" })
  public IProxyCredentials getProxyCredentials(URL url) throws CredentialsException {
    if (url.toExternalForm().equals("http://www.rssowl.org/rssowl2dg/tests/connection/authrequired/feed_rdf.xml"))
      return new IProxyCredentials() {
        public String getHost() {
          return "127.0.0.1";
        }

        public int getPort() {
View Full Code Here

  public IProxyCredentials getProxyCredentials(URL url) {
    final Map< ? , ? > authorizationInfo = Platform.getAuthorizationInfo(PROXY_IDENTIFIER, REALM, SCHEME);

    /* Proxy Credentials Provided */
    if (authorizationInfo != null)
      return new IProxyCredentials() {
        public String getHost() {
          return (String) authorizationInfo.get(PROXYHOST);
        }

        public int getPort() {
View Full Code Here

TOP

Related Classes of org.rssowl.core.connection.auth.IProxyCredentials

Copyright © 2018 www.massapicom. 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.