deplacmeent composer.phar et php-cs-fixer
This commit is contained in:
@ -3,20 +3,16 @@
|
||||
|
||||
namespace App\Controller;
|
||||
|
||||
use PDO;
|
||||
use App\Entity\User;
|
||||
use App\Form\UserType;
|
||||
use App\Services\PdoServices;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Contracts\HttpClient\HttpClientInterface;
|
||||
use Symfony\Component\HttpFoundation\Session\SessionInterface;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Exception\BadRequestException;
|
||||
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
|
||||
|
||||
class MainController extends AbstractController
|
||||
{
|
||||
@ -93,18 +89,19 @@ class MainController extends AbstractController
|
||||
return $this->render('login.html.twig', [
|
||||
"form" => $loginForm->createView(),
|
||||
"error_mail" => "mail non trouvé",
|
||||
|
||||
]);
|
||||
}
|
||||
$hashPassword = $datas[$this->getParameter('passwordColumnName')];
|
||||
$password = $loginForm->get('password')->getData();
|
||||
|
||||
if($this->pdoServices->verifyPassword($password, $hashPassword)){
|
||||
// On défait la mot de passe qui ne servira plus
|
||||
unset($datas[$this->getParameter('passwordColumnName')]);
|
||||
$this->session->set('datas', $datas);
|
||||
$response = $this->client->request('PUT', $this->getParameter('url_login_challenge_accept').$this->session->get('challenge'), [
|
||||
'json' => [
|
||||
'subject' => $email,
|
||||
'acr'=> 'string'
|
||||
],
|
||||
]);
|
||||
// On initie l'acceptation du login challenge émis par hydra et on récupère l'url de redirection
|
||||
|
Reference in New Issue
Block a user