|
6 | 6 | from django import http
|
7 | 7 | from django.contrib.auth.mixins import LoginRequiredMixin
|
8 | 8 | from django.contrib.auth.views import redirect_to_login
|
9 |
| -from django.http import HttpResponse, JsonResponse |
| 9 | +from django.http import HttpResponse |
10 | 10 | from django.shortcuts import resolve_url
|
11 | 11 | from django.utils import timezone
|
12 | 12 | from django.utils.decorators import method_decorator
|
@@ -325,17 +325,15 @@ def device_flow_token_response(
|
325 | 325 | if device.status == device.AUTHORIZATION_PENDING:
|
326 | 326 | pending_error = AuthorizationPendingError()
|
327 | 327 | return http.HttpResponse(
|
328 |
| - content=pending_error.json, |
329 |
| - status=pending_error.status_code, |
330 |
| - content_type="application/json" |
| 328 | + content=pending_error.json, status=pending_error.status_code, content_type="application/json" |
331 | 329 | )
|
332 | 330 |
|
333 | 331 | if device.status == device.DENIED:
|
334 | 332 | access_denied_error = AccessDenied()
|
335 | 333 | return http.HttpResponse(
|
336 | 334 | content=access_denied_error.json,
|
337 | 335 | status=access_denied_error.status_code,
|
338 |
| - content_type="application/json" |
| 336 | + content_type="application/json", |
339 | 337 | )
|
340 | 338 |
|
341 | 339 | url, headers, body, status = self.create_token_response(request)
|
|
0 commit comments