0

new to atk and going well until I started to implement UserAuth using sha256/salt. I can register and it creates and stores an encrypted password but I cannot login. It works with no encryption.

Has anyone implemented sha256/salt password encryption successfully?

The examples on the site seem outdated in this regard and some documentation relating to this no longer exists. I cannot find any relevant examples so I am finding it a little difficult.

Thanks in advance.

Micheal
  • 105
  • 7

1 Answers1

0

I'm using the following code in 4.2.1 now and it works fine...

$auth=$this->add('Auth_Basic');
$auth->usePasswordEncryption('sha256/salt');
$auth->setModel('User','user','pwd');
$auth->check();

You'll have to create a Model (User here) that holds the username/pwd and such...

gsteenss
  • 68
  • 5
  • Thank you. I eventually found that you can't just add the salt and externally generate a password using phpMyAdmin which was the main problem. – Micheal Jul 17 '12 at 02:15