public function getSecurityIdentities(TokenInterface $token)
    {
        $sids = parent::getSecurityIdentities($token);

        if ($token->getUser() instanceof \BackBee\Security\User) {
            foreach ($token->getUser()->getGroups() as $group) {
                $securityIdentity = new UserSecurityIdentity($group->getObjectIdentifier(), ClassUtils::getRealClass($group));
                array_unshift($sids, $securityIdentity);
            }
        }

        return $sids;
    }