Fmstrat / odm

ODM: Open Device Manager for Android
GNU General Public License v3.0
112 stars 48 forks source link

support HTTP Basic Authentication #7

Closed lexelby closed 10 years ago

lexelby commented 10 years ago

I'd like to be able to put ODM behind HTTP Basic Authentication, so that I don't have to worry about whether anyone else might try to tinker with it. Here's a pull request that might actually accomplish this.

To use: specify a username and password in the API url, for example https://user:password@yourhost.com/path/to/odm/

This is completely untested code. I don't even know how to build it! I pieced it together from a couple of tutorials I found, and I'm pretty rusty at Java. So maybe this should be considered a feature request, with some of the legwork done already, and maybe it'll even work as written :) I hope you like it!

Keep up the good work, and thanks a ton for open sourcing ODM.

Fmstrat commented 10 years ago

This code was close, some compilation issues with a String instead of URL variable. Rather than merge it since there were compilation errors, I've implemented a version of it in the latest APK, so it should work for you now.

lexelby commented 10 years ago

:D Thank you!!