hslavich / OneloginSamlBundle

OneLogin SAML Bundle for Symfony
MIT License
149 stars 94 forks source link

Typed property #196

Closed LaurentSanson closed 2 years ago

LaurentSanson commented 2 years ago
<?php

namespace Hslavich\OneloginSamlBundle\Security\User;

use Symfony\Component\Security\Core\User\UserInterface;

interface SamlUserFactoryInterface
{
    /**
     * Creates a new User object.
     */
    public function createUser(string $username, array $attributes = []): UserInterface;
}
a-menshchikov commented 2 years ago

Hello @LaurentSanson It cannot be done, because the deprecated Hslavich\OneloginSamlBundle\Security\Authentication\Provider\SamlProvider still pass the TokenInterface object into createUser: https://github.com/hslavich/OneloginSamlBundle/blob/201a447daf918e8a7c4feff4761fe35096fb695c/Security/Authentication/Provider/SamlProvider.php#L83-L91