diff --git a/config/routes/hslavich_saml.yaml b/config/routes/nbgrp_saml.yaml similarity index 58% rename from config/routes/hslavich_saml.yaml rename to config/routes/nbgrp_saml.yaml index a902a93e..6bf45795 100644 --- a/config/routes/hslavich_saml.yaml +++ b/config/routes/nbgrp_saml.yaml @@ -1,4 +1,4 @@ -hslavich_saml_sp: - resource: "@HslavichOneloginSamlBundle/Resources/config/routing.yml" +nbgrp_saml: + resource: "@NbgrpOneloginSamlBundle/Resources/config/routes.php" # Only load the SAML routes if SAML is enabled condition: "env('SAML_ENABLED') == '1' or env('SAML_ENABLED') == 'true'" diff --git a/src/Entity/UserSystem/User.php b/src/Entity/UserSystem/User.php index 7c271c6c..eba234c4 100644 --- a/src/Entity/UserSystem/User.php +++ b/src/Entity/UserSystem/User.php @@ -30,8 +30,8 @@ use App\Security\Interfaces\HasPermissionsInterface; use App\Validator\Constraints\Selectable; use App\Validator\Constraints\ValidPermission; use App\Validator\Constraints\ValidTheme; -use Hslavich\OneloginSamlBundle\Security\User\SamlUserInterface; use Jbtronics\TFAWebauthn\Model\LegacyU2FKeyInterface; +use Nbgrp\OneloginSamlBundle\Security\User\SamlUserInterface; use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface; use Symfony\Component\Serializer\Annotation\Groups; use Webauthn\PublicKeyCredentialUserEntity; @@ -967,7 +967,7 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe - public function setSamlAttributes(array $attributes) + public function setSamlAttributes(array $attributes): void { //When mail attribute exists, set it if (isset($attributes['email'])) { diff --git a/src/Helpers/LabelResponse.php b/src/Helpers/LabelResponse.php index 1dbb947b..3ce26516 100644 --- a/src/Helpers/LabelResponse.php +++ b/src/Helpers/LabelResponse.php @@ -54,7 +54,7 @@ class LabelResponse extends Response parent::__construct($content, $status, $headers); } - public function setContent($content): self + public function setContent($content): static { parent::setContent($content); @@ -64,7 +64,7 @@ class LabelResponse extends Response return $this; } - public function prepare(Request $request): self + public function prepare(Request $request): static { parent::prepare($request); diff --git a/src/Repository/UserRepository.php b/src/Repository/UserRepository.php index 3cc29788..648f86bd 100644 --- a/src/Repository/UserRepository.php +++ b/src/Repository/UserRepository.php @@ -24,6 +24,7 @@ namespace App\Repository; use App\Entity\UserSystem\User; use Doctrine\ORM\NonUniqueResultException; +use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface; use Symfony\Component\Security\Core\User\PasswordUpgraderInterface; use Symfony\Component\Security\Core\User\UserInterface; @@ -82,7 +83,7 @@ final class UserRepository extends NamedDBElementRepository implements PasswordU } } - public function upgradePassword(UserInterface $user, string $newHashedPassword): void + public function upgradePassword(UserInterface|PasswordAuthenticatedUserInterface $user, string $newHashedPassword): void { if ($user instanceof User) { $user->setPassword($newHashedPassword); diff --git a/src/Security/SamlUserFactory.php b/src/Security/SamlUserFactory.php index 39e67c0c..b5434be9 100644 --- a/src/Security/SamlUserFactory.php +++ b/src/Security/SamlUserFactory.php @@ -23,8 +23,8 @@ namespace App\Security; use App\Entity\UserSystem\Group; use App\Entity\UserSystem\User; use Doctrine\ORM\EntityManagerInterface; -use Hslavich\OneloginSamlBundle\Security\Http\Authenticator\Token\SamlToken; -use Hslavich\OneloginSamlBundle\Security\User\SamlUserFactoryInterface; +use Nbgrp\OneloginSamlBundle\Security\Http\Authenticator\Token\SamlToken; +use Nbgrp\OneloginSamlBundle\Security\User\SamlUserFactoryInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\Security\Core\Event\AuthenticationSuccessEvent; use Symfony\Component\Security\Core\User\UserInterface;