Jump to content

[AutoAuth] Problems with login


GFestari

Recommended Posts

I'm trying to log a user in from a 3rd party webapp using the AutoAuth feature (already configured the $autoauthkey param in configuration.php), here's a snippet of the code (Java):

 


public String makeUrl() {

	String email = "auser@email.com"
	String autoAuthKey = "m1l337KEI"

	// PHP time is in seconds, so we need convert from millis
	timestamp = (System.currentTimeMillis() / 1000L);

	StringBuilder sb = new StringBuilder(email).append(timestamp).append(autoAuthKey);

	// using org.apache.commons.codec.digest.DigestUtils to match PHP's sha1 algorithm
	hash = DigestUtils.shaHex(sb.toString());

	StringBuilder url = new StringBuilder("http://www.myDomain.com/whmcs/dologin.php?email=");
	sb.append(email).append("&timestamp=").append(timestamp).append("&hash=").append(hash);

	return url.toString();
}

 

So far so good but, as soon as I land I'm greeted with an "?a=login&incorrect=true" in the URL. Any ideas / suggestions?

 

Thanks in advance,

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated