This commit is contained in:
Jens L
2020-09-11 23:21:11 +02:00
committed by GitHub
parent 3f5d30e6fe
commit 23cccebb96
59 changed files with 403 additions and 254 deletions

View File

@ -14,7 +14,7 @@ from django.forms import ModelForm
from django.http import HttpRequest
from django.shortcuts import reverse
from django.utils import dateformat, timezone
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from jwkest.jwk import Key, RSAKey, SYMKey, import_rsa_key
from jwkest.jws import JWS

View File

@ -82,7 +82,7 @@ def extract_client_auth(request: HttpRequest) -> Tuple[str, str]:
b64_user_pass = auth_header.split()[1]
try:
user_pass = b64decode(b64_user_pass).decode("utf-8").split(":")
client_id, client_secret = tuple(user_pass)
client_id, client_secret = user_pass
except (ValueError, Error):
client_id = client_secret = ""
else:

View File

@ -2,7 +2,7 @@
from typing import Any, Dict, List
from django.http import HttpRequest, HttpResponse
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from django.views import View
from structlog import get_logger