def prefixed_userid(request):
    """In Kinto users ids are prefixed with the policy name that is
    contained in Pyramid Multiauth.
    If a custom authn policy is used, without authn_type, this method returns
    the user id without prefix.
    """
    authn_type = getattr(request, 'authn_type', None)
    if authn_type is not None:
        return f'{authn_type}:{request.selected_userid}'
