From f617f2f29864d9394f5620a08505838982a31d95 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Wed, 24 Jun 2015 12:16:27 +0200 Subject: [PATCH] Add debug log of ssl_info dict in the login view (fixes #7674) --- src/authentic2_pratic/auth_frontends.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/authentic2_pratic/auth_frontends.py b/src/authentic2_pratic/auth_frontends.py index 3841ea8..712b94a 100644 --- a/src/authentic2_pratic/auth_frontends.py +++ b/src/authentic2_pratic/auth_frontends.py @@ -1,3 +1,5 @@ +import logging + from django.utils.translation import gettext_noop from django.contrib.auth import authenticate from django.shortcuts import render @@ -23,6 +25,9 @@ class PraticFrontend(object): user = None how = None autologin = False + if hasattr(request, 'ssl_info'): + logger = logging.getLogger(__name__) + logger.debug('ssl_info: %r', request.ssl_info.__dict__) if constants.PRATIC_AUTOLOGIN_COOKIE_NAME not in request.COOKIES: if hasattr(request, 'ssl_info') and request.ssl_info and \ len(request.ssl_info.users) == 1: