added a debug message when client needs to be re-initialized

This commit is contained in:
David Kennedy 2024-02-13 10:37:34 -05:00
parent 1896bf5380
commit 69f6f4db0c
No known key found for this signature in database
GPG key ID: 6528A5386E66B96B

View file

@ -78,6 +78,7 @@ def openid(request):
try: try:
# If the CLIENT is none, attempt to reinitialize before handling the request # If the CLIENT is none, attempt to reinitialize before handling the request
if _client_is_none(): if _client_is_none():
logger.debug("OIDC client is None, attempting to initialize")
_initialize_client() _initialize_client()
request.session["acr_value"] = CLIENT.get_default_acr_value() request.session["acr_value"] = CLIENT.get_default_acr_value()
request.session["next"] = request.GET.get("next", "/") request.session["next"] = request.GET.get("next", "/")
@ -93,6 +94,7 @@ def login_callback(request):
try: try:
# If the CLIENT is none, attempt to reinitialize before handling the request # If the CLIENT is none, attempt to reinitialize before handling the request
if _client_is_none(): if _client_is_none():
logger.debug("OIDC client is None, attempting to initialize")
_initialize_client() _initialize_client()
query = parse_qs(request.GET.urlencode()) query = parse_qs(request.GET.urlencode())
userinfo = CLIENT.callback(query, request.session) userinfo = CLIENT.callback(query, request.session)