def prefixed_userid(request):
 authn_type = getattr(request, 'authn_type', None)
 if (authn_type is not None):
  return ((authn_type + ':') + request.selected_userid)

def prefixed_userid ( request ) : authn_type = getattr ( request , 'authn_type' , None ) if ( authn_type is not None ) : return ( ( authn_type + ':' ) + request . selected_userid )
in kinto users ids are prefixed with the policy name that is contained in pyramid multiauth .