Jsoup Authentication Failed
I'm trying to connect this website : https://ent.enteduc.fr/CookieAuth.dll?GetLogon?curl=Z2F&reason=0&formdir=1 with the following code : Connection.Response response = Jso
Solution 1:
There is nothing wrong with your code. It works. I tried the default user name and password you supplied. This is what the site does...
- You login successfully and it sends a HTTP 302 to the path / and also gives you a cookie that identifies you.
HTTP/1.1 302 Moved Temporarily
Location: https://ent.enteduc.fr/
Set-Cookie: XXX
- The browser requests for
/
and the server responds with another HTTP 302
HTTP/1.1 302 Found
Connection: Keep-Alive
Location: /etabs/0680001F/Pages/Accueil.aspx
- Requesting for
/etabs/0680001F/Pages/Accueil.aspx
results in a 200 OK with HTML content written in french. Excusez moi ! Je ne parle pas francais.
Change your code to follow the redirects and set the cookies on each step and you should be fine.
[EDIT]
When you're done please remove the authentication info you supplied on this post.
Post a Comment for "Jsoup Authentication Failed"