mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-30 14:49:55 +02:00
Use the newer scheb/2fa bundle instead of scheb/two_factor_bundle
Currently the U2F auth is broken, as there is no plugin supporting it in the new system
This commit is contained in:
parent
8e58ad3441
commit
600119276c
14 changed files with 241 additions and 307 deletions
|
@ -56,7 +56,7 @@ use u2flib_server\Registration;
|
|||
* })
|
||||
* @ORM\HasLifecycleCallbacks()
|
||||
*/
|
||||
class U2FKey implements TwoFactorKeyInterface
|
||||
class U2FKey /*implements TwoFactorKeyInterface*/
|
||||
{
|
||||
use TimestampTrait;
|
||||
|
||||
|
@ -112,13 +112,13 @@ class U2FKey implements TwoFactorKeyInterface
|
|||
**/
|
||||
protected $user;
|
||||
|
||||
public function fromRegistrationData(Registration $data): void
|
||||
/*public function fromRegistrationData(Registration $data): void
|
||||
{
|
||||
$this->keyHandle = $data->keyHandle;
|
||||
$this->publicKey = $data->publicKey;
|
||||
$this->certificate = $data->certificate;
|
||||
$this->counter = $data->counter;
|
||||
}
|
||||
}*/
|
||||
|
||||
public function getKeyHandle()
|
||||
{
|
||||
|
|
|
@ -65,8 +65,8 @@ use Doctrine\Common\Collections\Collection;
|
|||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Exception;
|
||||
use function in_array;
|
||||
use R\U2FTwoFactorBundle\Model\U2F\TwoFactorInterface as U2FTwoFactorInterface;
|
||||
use R\U2FTwoFactorBundle\Model\U2F\TwoFactorKeyInterface;
|
||||
//use R\U2FTwoFactorBundle\Model\U2F\TwoFactorInterface as U2FTwoFactorInterface;
|
||||
//use R\U2FTwoFactorBundle\Model\U2F\TwoFactorKeyInterface;
|
||||
use Scheb\TwoFactorBundle\Model\BackupCodeInterface;
|
||||
use Scheb\TwoFactorBundle\Model\Google\TwoFactorInterface;
|
||||
use Scheb\TwoFactorBundle\Model\PreferredProviderInterface;
|
||||
|
@ -84,7 +84,7 @@ use Symfony\Component\Validator\Constraints as Assert;
|
|||
* @ORM\EntityListeners({"App\EntityListeners\TreeCacheInvalidationListener"})
|
||||
* @UniqueEntity("name", message="validator.user.username_already_used")
|
||||
*/
|
||||
class User extends AttachmentContainingDBElement implements UserInterface, HasPermissionsInterface, TwoFactorInterface, BackupCodeInterface, TrustedDeviceInterface, U2FTwoFactorInterface, PreferredProviderInterface, PasswordAuthenticatedUserInterface
|
||||
class User extends AttachmentContainingDBElement implements UserInterface, HasPermissionsInterface, TwoFactorInterface, BackupCodeInterface, TrustedDeviceInterface, /*U2FTwoFactorInterface,*/ PreferredProviderInterface, PasswordAuthenticatedUserInterface
|
||||
{
|
||||
//use MasterAttachmentTrait;
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ namespace App\Validator\Constraints;
|
|||
|
||||
use App\Entity\UserSystem\User;
|
||||
use Scheb\TwoFactorBundle\Security\TwoFactor\Provider\Google\GoogleAuthenticator;
|
||||
use Scheb\TwoFactorBundle\Security\TwoFactor\Provider\Google\GoogleAuthenticatorInterface;
|
||||
use Symfony\Component\Form\FormInterface;
|
||||
use Symfony\Component\Validator\Constraint;
|
||||
use Symfony\Component\Validator\ConstraintValidator;
|
||||
|
@ -54,7 +55,7 @@ class ValidGoogleAuthCodeValidator extends ConstraintValidator
|
|||
{
|
||||
protected $googleAuthenticator;
|
||||
|
||||
public function __construct(GoogleAuthenticator $googleAuthenticator)
|
||||
public function __construct(GoogleAuthenticatorInterface $googleAuthenticator)
|
||||
{
|
||||
$this->googleAuthenticator = $googleAuthenticator;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue