'Return the ``repoze.who.userid`` key from the detected identity.'

def unauthenticated_userid(self, request):

    identity = self._get_identity(request)
    if (identity is None):
        return None
    return identity['repoze.who.userid']
