Welcome Guest, Not a member yet? Register   Sign In
creating safer login
#1

[eluser]Prasad.P[/eluser]
Hi Everybody,

I have implemented http authentication method of login form without CI, and also with CI. The CI Function is as follows:

function check()
{
$this->load->helper(array('url','form'));
$this->load->model('Loginmodel');
if ((isset($_SERVER['PHP_AUTH_USER'])) && (isset($_SERVER['PHP_AUTH_PW'])))
{
if ($this->Loginmodel->verify_login($_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW']))
{
redirect('/login/logged');
}
else
{
redirect('/main/index');
}
}
else
{
header('WWW-Authenticate: Basic realm=""');
header('HTTP/1.0 401 Unauthorized');
echo 'Please close the Browser and open the website in a new window';
exit;
}
}

Can anybody suggest me any other safer method like http authentication.
#2

[eluser]nirbhab[/eluser]
If you are looking forward for a very secure authentication, than i would prefer to use your authentication on HTTPS, rather than HTTP, have a look over google or yahoo login or any bank login, they run on HTTPS, it runs on same server as http, but SSL certificate is required, and connection goes to a tunnel mode, most secure, TLS is more advance tunneling method.




Theme © iAndrew 2016 - Forum software by © MyBB