abstract class AbstractAuthenticator implements AuthenticatorInterface
{ /**
* Shortcut to create a PostAuthenticationToken for you, if you don't really
* care about which authenticated token you're using.
*/
public function createToken(Passport
$passport, string
$firewallName): TokenInterface
{ return new PostAuthenticationToken($passport->
getUser(),
$firewallName,
$passport->
getUser()->
getRoles());
}}