Added login and posting functionality

Signed-off-by: Gergely Polonkai (W00d5t0ck) <polesz@w00d5t0ck.info>
This commit is contained in:
Gergely Polonkai (W00d5t0ck)
2012-09-04 17:21:04 +02:00
parent 5bcd9f079b
commit 04d408aee0
12 changed files with 277 additions and 18 deletions

View File

@@ -0,0 +1,23 @@
<?php
namespace GergelyPolonkai\FrontBundle\Service;
use Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface;
use JMS\DiExtraBundle\Annotation as DI;
/**
* Description of CryptEncoder
*
* @author polonkai.gergely
*
* @DI\Service("gergely_polonkai_front.service.crypt_encoder")
*/
class CryptEncoder implements PasswordEncoderInterface
{
public function encodePassword($raw, $salt) {
return crypt($raw);
}
public function isPasswordValid($encoded, $raw, $salt) {
return (crypt($raw, $encoded) === $encoded);
}
}