Page 1 of 1

Wifi authentication

Posted: Sat Mar 23, 2013 6:01 pm
by rimai
I patched the libraries to allow for wifi authentication.
https://github.com/reefangel/Libraries/issues/71
Basically, it is not http authentication as we were originally trying.
It's actually using the portal key as authentication.
I need people to test it.
My initial tests worked fine.
Here is how it will work.
You must use the Portal function with a key in your code. Example:

Code: Select all

ReefAngel.Portal("reefangel","mysecretkey");
Then, everytime you use the webserver, you must call it with the key like this:
http://ipaddress:2000/?key=mysecretkey
http://ipaddress:2000/r99?key=mysecretkey
If you fail to provide the correct key, the controller will simply display "Invalid Key".
We will need the apps to be updated for this to work with the key.

Re: Wifi authentication

Posted: Sat Mar 23, 2013 6:09 pm
by rimai
This idea was actually sparked by a chat I had with thekameleon :)
Thanks for the contribution!!!

Re: Wifi authentication

Posted: Sat Mar 23, 2013 6:44 pm
by binder
rimai wrote:This idea was actually sparked by a chat I had with thekameleon :)
Thanks for the contribution!!!
Great contribution.

I can add that in to the Android app if it works out well.

Re: Wifi authentication

Posted: Mon Apr 29, 2013 3:58 pm
by thekameleon
Its not perfect but if you make a random enough key, it will prevent random url generators from turning on your ATO by accident... On this point... would it be possible to support both the key in the url get as well as a post (in the body)?

Re: Wifi authentication

Posted: Mon Apr 29, 2013 4:11 pm
by rimai
Have you pulled the git branch and tested it?
The controller only accepts GET requests

Re: Wifi authentication

Posted: Tue Apr 30, 2013 4:12 pm
by thekameleon
I have the latest 1.0.5 and I tried it both with and without the key and in both queires I got results... Is there something else I need to turn on?

Re: Wifi authentication

Posted: Tue Apr 30, 2013 4:13 pm
by thekameleon
Did you take care of the portal page to submit the key as well. casue if it does work and you di not the portal page would stop working right?

Re: Wifi authentication

Posted: Tue Apr 30, 2013 6:03 pm
by rimai
I did not push the changes for wifi key authentication.
It's still pending in the issue list on a separate branch.
I need to make sure it works with web browser and also, we need to make sure that the apps can be updated as it will break them.

Re: Wifi authentication

Posted: Wed May 01, 2013 8:46 am
by binder
rimai wrote:I did not push the changes for wifi key authentication.
It's still pending in the issue list on a separate branch.
I need to make sure it works with web browser and also, we need to make sure that the apps can be updated as it will break them.
I honestly have not tested it with my android app. I know I need to but I have been focusing on some other drastic improvements instead.

Re: Wifi authentication

Posted: Wed May 01, 2013 11:57 am
by thekameleon
OK fair enough. I will also incorporate into my apps and service I am working on. Does the portal currently send the key now?

Re: Wifi authentication

Posted: Wed May 01, 2013 12:12 pm
by rimai
No, it does not.