Identity/SecurityIdentityManager.php
protected function addSpecialRoles(TokenInterface $token, array $sids)
    {
        $sids = $this->injectSpecialRoles($sids);

        if ($this->authenticationTrustResolver->isFullFledged($token)) {
            $sids[] = new RoleSecurityIdentity('role', AuthenticatedVoter::IS_AUTHENTICATED_FULLY);
            $sids[] = new RoleSecurityIdentity('role', AuthenticatedVoter::IS_AUTHENTICATED_REMEMBERED);
            $sids[] = new RoleSecurityIdentity('role', AuthenticatedVoter::IS_AUTHENTICATED_ANONYMOUSLY);
        } elseif ($this->authenticationTrustResolver->isRememberMe($token)) {
            $sids[] = new RoleSecurityIdentity('role', AuthenticatedVoter::IS_AUTHENTICATED_REMEMBERED);
            $sids[] = new RoleSecurityIdentity('role', AuthenticatedVoter::IS_AUTHENTICATED_ANONYMOUSLY);
        } elseif ($this->authenticationTrustResolver->isAnonymous($token)) {
            $sids[] = new RoleSecurityIdentity('role', AuthenticatedVoter::IS_AUTHENTICATED_ANONYMOUSLY);
        }

        return $sids;
    }
protected function addSpecialRoles(TokenInterface $token, array $sids)
    {
        $sids = $this->injectSpecialRoles($sids);

        if ($this->authenticationTrustResolver->isFullFledged($token)) {
            $sids[] = new RoleSecurityIdentity('role', AuthenticatedVoter::IS_AUTHENTICATED_FULLY);
            $sids[] = new RoleSecurityIdentity('role', AuthenticatedVoter::IS_AUTHENTICATED_REMEMBERED);
            $sids[] = new RoleSecurityIdentity('role', AuthenticatedVoter::IS_AUTHENTICATED_ANONYMOUSLY);
        } elseif ($this->authenticationTrustResolver->isRememberMe($token)) {
            $sids[] = new RoleSecurityIdentity('role', AuthenticatedVoter::IS_AUTHENTICATED_REMEMBERED);
            $sids[] = new RoleSecurityIdentity('role', AuthenticatedVoter::IS_AUTHENTICATED_ANONYMOUSLY);
        } elseif ($this->authenticationTrustResolver->isAnonymous($token)) {
            $sids[] = new RoleSecurityIdentity('role', AuthenticatedVoter::IS_AUTHENTICATED_ANONYMOUSLY);
        }

        return $sids;
    }
protected function addSpecialRoles ( TokenInterface $ token , array $ sids ) { $ sids = $ this -> injectSpecialRoles ( $ sids ) ; if ( $ this -> authenticationTrustResolver -> isFullFledged ( $ token ) ) { $ sids [ ] = new RoleSecurityIdentity ( 'role' , AuthenticatedVoter :: IS_AUTHENTICATED_FULLY ) ; $ sids [ ] = new RoleSecurityIdentity ( 'role' , AuthenticatedVoter :: IS_AUTHENTICATED_REMEMBERED ) ; $ sids [ ] = new RoleSecurityIdentity ( 'role' , AuthenticatedVoter :: IS_AUTHENTICATED_ANONYMOUSLY ) ; } elseif ( $ this -> authenticationTrustResolver -> isRememberMe ( $ token ) ) { $ sids [ ] = new RoleSecurityIdentity ( 'role' , AuthenticatedVoter :: IS_AUTHENTICATED_REMEMBERED ) ; $ sids [ ] = new RoleSecurityIdentity ( 'role' , AuthenticatedVoter :: IS_AUTHENTICATED_ANONYMOUSLY ) ; } elseif ( $ this -> authenticationTrustResolver -> isAnonymous ( $ token ) ) { $ sids [ ] = new RoleSecurityIdentity ( 'role' , AuthenticatedVoter :: IS_AUTHENTICATED_ANONYMOUSLY ) ; } return $ sids ; }
Add the security identities of special roles.

@param TokenInterface              $token The token
@param SecurityIdentityInterface[] $sids  The security identities

@return SecurityIdentityInterface[]
Add the security identities of special roles .