This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Call with: | |
String date = getDate(); | |
String md5 = getMD5("passwprd", date); | |
checkauth(date, md5, email); | |
Code: | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AuthHttpHandler { | |
private String URI_GET_AUTH = "http://melfridinbot.appspot.com/mobile/checkauth"; | |
protected void authRequest(String mobilePassword, String userEmail) throws NoSuchAlgorithmException, IOException { | |
HttpClient client = new DefaultHttpClient(); | |
HttpGet getRequest = new HttpGet(URI_GET_AUTH); | |
getRequest.addHeader("token", getMD5(mobilePassword)); | |
getRequest.addHeader("tokenDate", getDate()); |