Created
May 18, 2016 06:06
-
-
Save abhinavgarg33/7524fa1935aa2d8908ca38e9a45ad9ea to your computer and use it in GitHub Desktop.
Not able to login to freshdesk. I am using the below written code. Can someone tell me what is the issue?? Thanks in advance!!
This file contains hidden or 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
function getSSOUrl($strName, $strEmail) { | |
$time = time(); | |
return FRESHDESK_BASE_URL. | |
"login/sso/?name=". | |
urlencode($strName). | |
"&email=". | |
urlencode($strEmail). | |
"×tamp=". | |
$time. | |
"&hash=". | |
getHash($strName,$strEmail,$time); | |
} | |
function getHash($strName, $strEmail, $time) { | |
$to_be_hashed = $strName . FRESHDESK_SHARED_SECRET . $strEmail . $time; | |
return hash_hmac('md5', $to_be_hashed, FRESHDESK_SHARED_SECRET); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment