Finished authentication
Signed-off-by: Gergely POLONKAI (W00d5t0ck) <polesz@w00d5t0ck.info>
This commit is contained in:
18
src/KekRozsak/SecurityBundle/Service/CryptEncoder.php
Normal file
18
src/KekRozsak/SecurityBundle/Service/CryptEncoder.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
namespace KekRozsak\SecurityBundle\Service;
|
||||
|
||||
use Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface;
|
||||
|
||||
class CryptEncoder implements PasswordEncoderInterface
|
||||
{
|
||||
function encodePassword($raw, $salt)
|
||||
{
|
||||
return crypt($raw);
|
||||
}
|
||||
|
||||
function isPasswordValid($encoded, $raw, $salt)
|
||||
{
|
||||
return (crypt($raw, $salt) == $encoded);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user