php-censor/src/Security/Authentication/UserProvider/Internal.php

41 lines
796 B
PHP
Raw Normal View History

<?php
2016-12-29 06:43:02 +01:00
namespace PHPCensor\Security\Authentication\UserProvider;
2016-12-29 06:43:02 +01:00
use PHPCensor\Model\User;
use PHPCensor\Security\Authentication\LoginPasswordProviderInterface;
/**
2016-12-29 06:43:02 +01:00
* Internal user provider
*
* @author Adirelle <adirelle@gmail.com>
*/
class Internal extends AbstractProvider implements LoginPasswordProviderInterface
{
2017-11-05 15:48:36 +01:00
/**
* @param User $user
* @param string $password
*
* @return boolean
*/
public function verifyPassword(User $user, $password)
{
return password_verify($password, $user->getHash());
}
public function checkRequirements()
{
// Always fine
}
2017-11-05 15:48:36 +01:00
/**
* @param string $identifier
*
* @return null
*/
public function provisionUser($identifier)
{
return null;
}
}