Menu

basic auth

Help
2004-12-22
2013-03-22
  • Uwe Schaefer

    Uwe Schaefer - 2004-12-22

    hi.

    love your reader. unfortunately i faced a little problem with "basic auth"-protected resources via http.

    tried an url like:

    http://name:password@host/somepath/somefile.rss

    with nothing but an 401 sent back.

    watching the communication shows the following request being sent to the server:

    GET /somepath/somefile.rss HTTP/1.1
    User-Agent: Java/1.5.0
    Host: whatever.somehost.de
    Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
    Connection: keep-alive
    Content-type: application/x-www-form-urlencoded

    so the servers answer on that is correct.

    any idea how to use basic-auth resources ?

    thanks anyway.
    cu uwe

     
    • Peter Nehrer

      Peter Nehrer - 2005-01-10

      Uwe, I have not tried this yet. The app uses java.net.* to retrieve feed content, so this scheme should be supported. I'll take a look at why it doesn't seem to work.

       
    • Peter Nehrer

      Peter Nehrer - 2005-01-14

      Ok, I have a fix that will go into the next release (hopefully soon). It's not ideal -- you still put your userid:password@ in front of your host name in the feed's url -- and it only works with basic auth, but for now it'll have to do.

      I experimented with a more general solution; java.net.Authenticator supposedly provides a way to do authentication on demand... but may I say it sucks:

      1. Authenticator is a per-JVM singleton, which is unacceptable for a plug-in based environment such as Eclipse

      2. you don't know what URL exactly you are authenticating, you only know the server and the realm (which would not be all that bad in the end, but...)

      3. poping up a dialog box when the user doesn't expect it (for example, periodic feed refresh) is to me poor UI. Alternatively, the user can enter the credentials when setting up the feed (and Eclipse provides a way to store them -- Platform.addAuthenticationInfo()), but then they have to know everything (including the realm) ahead of time... which wouldn't be so bad (we could omit the realm altogether), but then there is not way to flush these credentials, because the JVM caches them (even though you flush them from Eclipse, they stick around until you restart... that's just too much)!

      This will be addressed in the future, but through other means.

       
    • Pierre Gaudin

      Pierre Gaudin - 2005-11-12

      Hi

      I have similar problem with https secure location.

      I try https://name:password@host/somepath/somefile.rss
      without any succes.

      Can you help me please

       

Log in to post a comment.