<?php

declare(strict_types=1);

namespace App\Model\Login;

use Nette;
use PhpParser\Node\Expr\BinaryOp\BooleanAnd;

/**
 * Naše vlastní indetita přihlášeného uživatele.
 */
class UserIdentity extends Nette\Security\SimpleIdentity
{
  public function __construct(
    int $id,
    array $roles,
    /*
    * Server connection string.
    */
    public string $dsn,
    public ServerCredentials $credentials,
    public string $username,
    public string $password, 
    public bool $twoFactor,
    public ?string $totpSecret
  ) {
    parent::__construct($id, $roles, null);
  }
}