Skip to content

Commit

Permalink
不要useの削除。
Browse files Browse the repository at this point in the history
  • Loading branch information
sai-gillingham committed Nov 8, 2023
1 parent c001291 commit acf549e
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/Eccube/Service/TwoFactorAuthService.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,13 @@
namespace Eccube\Service;

use Eccube\Common\EccubeConfig;
use Eccube\Entity\Member;
use Eccube\Security\Core\Encoder\PasswordEncoder;
use RobThree\Auth\TwoFactorAuth;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\Cookie;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactoryInterface;
use Symfony\Component\PasswordHasher\PasswordHasherInterface;
use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface;

class TwoFactorAuthService
{
Expand Down Expand Up @@ -114,15 +111,15 @@ public function __construct(
}

/**
* @param Member $Member
* @param \Eccube\Entity\Member $Member
*
* @return boolean
*/
public function isAuth($Member)
{
if (($json = $this->request->cookies->get($this->cookieName))) {
$configs = json_decode($json);
/** @var PasswordEncoder $encoder */
/** @var \Eccube\Security\Core\Encoder\PasswordEncoder $encoder */
$encoder = $this->encoder;
$encodedString = $encoder->encodePassword($Member->getId().$Member->getTwoFactorAuthKey(), $Member->getSalt());
if (
Expand All @@ -144,13 +141,13 @@ public function isAuth($Member)
}

/**
* @param Member $Member
* @param \Eccube\Entity\Member $Member
*
* @return Cookie
*/
public function createAuthedCookie($Member)
{
/** @var PasswordEncoder $encoder */
/** @var \Eccube\Security\Core\Encoder\PasswordEncoder $encoder */
$encoder = $this->encoder;
$encodedString = $encoder->encodePassword($Member->getId().$Member->getTwoFactorAuthKey(), $Member->getSalt());

Expand Down

0 comments on commit acf549e

Please sign in to comment.