From f4ca413ab2d5260b115120d99ef7fb18af78df2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Thu, 7 Apr 2016 18:29:33 +0200 Subject: [PATCH] misc: fix handling of AnonymousUser when doing signed requests (#10583) --- combo/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/combo/utils.py b/combo/utils.py index 494ba48..411b210 100644 --- a/combo/utils.py +++ b/combo/utils.py @@ -45,13 +45,13 @@ class Requests(RequestsSession): raise_if_not_cached = kwargs.pop('raise_if_not_cached', False) if remote_service: - if not user: + if isinstance(user, dict): + query_params = user.copy() + elif not user or not user.is_authenticated(): if without_user: query_params = {} else: query_params = {'NameID': '', 'email': ''} - elif isinstance(user, dict): - query_params = user.copy() else: query_params = {} if federation_key == 'nameid': -- 2.8.0.rc3