'A list of effective principals derived from the identity.
This will return a list of principals including, at least,
:data:`pyramid.security.Everyone`. If there is no identity, or
the ``callback`` returns ``None``, this will be the only principal.
If the ``callback`` does not return ``None`` and an identity is
found, then the principals will include
:data:`pyramid.security.Authenticated`, the ``authenticated_userid``
and the list of principals returned by the ``callback``.'

def effective_principals(self, request):

    effective_principals = [Everyone]
    identity = self._get_identity(request)
    if (identity is None):
        (self.debug and self._log(('repoze.who    identity    was    None;    returning    %r' % effective_principals), 'effective_principals', request))
        return effective_principals
    if (self.callback is None):
        groups = []
    else:
        groups = self.callback(identity, request)
    if (groups is None):
        (self.debug and self._log(('security    policy    groups    callback    returned    None;    returning    %r' % effective_principals), 'effective_principals', request))
        return effective_principals
    userid = identity['repoze.who.userid']
    if (userid is None):
        (self.debug and self._log(('repoze.who.userid    was    None;    returning    %r' % effective_principals), 'effective_principals', request))
        return effective_principals
    if (self._clean_principal(userid) is None):
        (self.debug and self._log(('unauthenticated_userid    returned    disallowed    %r;    returning    %r    as    if    it    was    None' % (userid, effective_principals)), 'effective_principals', request))
        return effective_principals
    effective_principals.append(Authenticated)
    effective_principals.append(userid)
    effective_principals.extend(groups)
    return effective_principals
