Hi There
Right now I am using DSP with an Angularjs app and everything is working fine as the users are checked against the DSP user table but I would like to do the following:
- User enters the email and password
- Instead of checking against the DSP user database it should send an http request to a password protected URL which takes in the email and password and returns code 200 if it is good.
- Then update the password in the DSP account and login in the user using the regular DSP user database credentials.
This is the equivalent code using PHP CURL:
$curl = curl_init('https://mail.google.com/mail/feed/atom');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, $this->params->get('verifypeer', 1));
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_USERPWD, $credentials['username'] . ':' . $credentials['password']);
curl_exec($curl);
$code = curl_getinfo($curl, CURLINFO_HTTP_CODE);
switch ($code)
{
case 200:
$message = 'ACCESS_GRANTED';
$success = 1;
break;
case 401:
$message = 'ACCESS_DENIED';
break;
default:
$message = 'UNKNOWN_ACCESS_DENIED';
break;
}
I would really appreciate any help. I am thinking I have to edit the DSP angular-user-module to get the desired results.