I am trying to make a WISPr client. For this, I have read WISPr 1.0, 1.2 and 2.0 specifications.
Considering a 1.0 WISPr client, I have parsed the LoginURL
from the hotspot login page, and try to make the authentication request (login = test, password = pass) :
POST : http://hotspot.server.com/login
Parameters : button=Login&UserName=test&Password=pass&FNAME=0&OriginatingServer=http://www.google.com
My credentials are good because I use them via the HTML form of the webpage.
With a http POST request, the authentication always failed with the response :
<AuthenticationReply>
<MessageType>120</MessageType>
<ResponseCode>100</ResponseCode>
<ReplyMessage>Authentication Failure</ReplyMessage>
</AuthenticationReply>
I have tried with differents hotspots of other networks with other good credentials.
Do you have an idea where my error comes in my authentication request ?
I've done some WISPr client tools in the past and this seems quite weird, at least from the data provided. Best approach I would suggest is to use Wireshark to capture the traffic of a login session via browser and compare it to the session handled by your code. If the browser also uses POST check for missing headers, malformed data etc. If in fact browser does use GET then you should try to stick to that scenario as suggested. Maybe the hotspot supports only one kind of method, e.g. notification polling. Still, without Wireshark details it is hard to guess. Also remember that there are certain differences between WISPr 1.0 and WISPr 2.0 and you haven't state what is the version of the hotspot you are logging in to.