contacts: log user creation requests to authentic (#28828)

This commit is contained in:
Frédéric Péters 2018-12-10 19:18:02 +01:00
parent d8cf9bb827
commit 879fe9643a
1 changed files with 4 additions and 0 deletions

View File

@ -15,6 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import json
import logging
import random
import requests
import time
@ -140,10 +141,13 @@ class ContactAdd(FormView):
url = authentic_url + 'api/users/?orig=%s' % authentic_orig
signed_url = sign_url(url, authentic_secret)
logger = logging.getLogger(__name__)
logger.info('POST to authentic (%r)', json.dumps(msg))
authentic_response = requests.post(
signed_url,
data=json.dumps(msg),
headers={'Content-type': 'application/json'})
logger.info('Got authentic response (%r)', authentic_response.text)
user_uuid = authentic_response.json().get('uuid')
for i in range(100):