Skip to content

Commit

Permalink
Merge pull request #10 from krytenuk/fix/typehint-password-reminder
Browse files Browse the repository at this point in the history
Database entity changes
  • Loading branch information
krytenuk committed Apr 11, 2023
2 parents cc165d2 + 387dd94 commit 99da152
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,7 @@ Fixed bug where Google 2FA did not work with leading zero
0.3.3
Fixed command line error when no encryption set
Changed email/sms code type to string

0.3.4 Changed auto generated id's to unsigned int (may break database)

0.3.5 Changed type hint for PasswordReminder::setDateCreated() to DateTimeInterface
4 changes: 2 additions & 2 deletions config/doctrine.auth.config.local.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ return [
* Encryption
*/
'encryptData' => false, // Encrypt user data, default = false
'rsaPrivateKeyFile' => 'rsa/id_rsa.pem', // <- path and filename of your rsa private key @see https://docs.rightscale.com/faq/How_Do_I_Generate_My_Own_SSH_Key_Pair.html
'rsaPublicKeyFile' => 'rsa/id_rsa.pub', // <- path and filename of your rsa public key
'rsaPrivateKeyFile' => 'rsa/key.pem', // <- path and filename of your rsa private key @see https://docs.rightscale.com/faq/How_Do_I_Generate_My_Own_SSH_Key_Pair.html
'rsaPublicKeyFile' => 'rsa/key.pub', // <- path and filename of your rsa public key
'rsaKeyPassphrase' => 'passphrase', // Optional passphrase used when creating the above keys
/**
* Registration
Expand Down
2 changes: 1 addition & 1 deletion src/Command/DecryptEntityCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ protected function configure()
->setDescription('Decrypt given entitys data')
->setHelp(
<<<EOT
Encrypt sensitive data on database
Decrypt sensitive data on database
EOT
)
->addArgument('entity', InputArgument::REQUIRED, 'Entity class to decrypt, must be instance of FwsDoctrineAuth\Entity\EntityInterface')
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/BaseUsers.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class BaseUsers implements EntityInterface
/**
* @var int|null
*
* @ORM\Column(name="user_id", type="integer", nullable=false)
* @ORM\Column(name="user_id", type="integer", options={"unsigned"=true}, nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/FailedLoginAttemptsLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class FailedLoginAttemptsLog implements EntityInterface
{
/**
* @var int|null
* @ORM\Column(name="login_attempt_id", type="integer", nullable=false)
* @ORM\Column(name="login_attempt_id", type="integer", options={"unsigned"=true}, nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/IpBlocked.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class IpBlocked implements EntityInterface

/**
* @var int|null
* @ORM\Column(name="block_id", type="integer", nullable=false)
* @ORM\Column(name="block_id", type="integer", options={"unsigned"=true}, nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/LoginLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class LoginLog implements EntityInterface

/**
* @var int|null
* @ORM\Column(name="log_id", type="integer", nullable=false)
* @ORM\Column(name="log_id", type="integer", options={"unsigned"=true}, nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
Expand Down
6 changes: 3 additions & 3 deletions src/Entity/PasswordReminder.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class PasswordReminder implements EntityInterface

/**
* @var int|null
* @ORM\Column(name="password_reminder_id", type="integer", nullable=false)
* @ORM\Column(name="password_reminder_id", type="integer", options={"unsigned"=true}, nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
Expand Down Expand Up @@ -119,10 +119,10 @@ public function setUser(BaseUsers $user)

/**
*
* @param DateTimeImmutable $dateCreated
* @param DateTimeInterface $dateCreated
* @return $this
*/
public function setDateCreated(DateTimeImmutable $dateCreated)
public function setDateCreated(DateTimeInterface $dateCreated)
{
$this->dateCreated = $dateCreated;
return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/TwoFactorAuthMethods.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class TwoFactorAuthMethods implements EntityInterface

/**
* @var int|null
* @ORM\Column(name="auth_method_id", type="integer", nullable=false)
* @ORM\Column(name="auth_method_id", type="integer", options={"unsigned"=true}, nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/UserRoles.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class UserRoles implements EntityInterface
/**
* @var int|null
*
* @ORM\Column(name="user_role_id", type="integer", nullable=false)
* @ORM\Column(name="user_role_id", type="integer", options={"unsigned"=true}, nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
Expand Down

0 comments on commit 99da152

Please sign in to comment.