. */ namespace App\Security; use App\Entity\UserSystem\User; use Hslavich\OneloginSamlBundle\Security\User\SamlUserFactoryInterface; use Symfony\Component\Security\Core\User\UserInterface; class SamlUserFactory implements SamlUserFactoryInterface { public function createUser($username, array $attributes = []): UserInterface { $user = new User(); $user->setName($username); $user->setNeedPwChange(false); $user->setPassword('$$SAML$$'); $user->setSamlAttributes($attributes); return $user; } }