Services/JWTManager.php
protected function addUserIdentityToPayload(UserInterface $user, array &$payload)
    {
        $accessor                    = PropertyAccess::createPropertyAccessor();
        $payload[$this->userIdClaim ?: $this->userIdentityField] = $accessor->getValue($user, $this->userIdentityField);
    }
protected function addUserIdentityToPayload(UserInterface $user, array &$payload)
    {
        $accessor                    = PropertyAccess::createPropertyAccessor();
        $payload[$this->userIdClaim ?: $this->userIdentityField] = $accessor->getValue($user, $this->userIdentityField);
    }
protected function addUserIdentityToPayload ( UserInterface $ user , array & $ payload ) { $ accessor = PropertyAccess :: createPropertyAccessor ( ) ; $ payload [ $ this -> userIdClaim ? : $ this -> userIdentityField ] = $ accessor -> getValue ( $ user , $ this -> userIdentityField ) ; }
Add user identity to payload, username by default.
Override this if you need to identify it by another property.

@param UserInterface $user
@param array         &$payload
Add user identity to payload username by default . Override this if you need to identify it by another property .