(self, request, callback, callback_args, callback_kwargs)
| 84 | """Middleware accepting requests that either contain a valid CSRF token or a personal API key.""" |
| 85 | |
| 86 | def process_view(self, request, callback, callback_args, callback_kwargs): |
| 87 | result = super().process_view(request, callback, callback_args, callback_kwargs) # None if request accepted |
| 88 | # if super().process_view did not find a valid CSRF token, try looking for a personal API key |
| 89 | if result is not None and PersonalAPIKeyAuthentication.find_key_with_source(request) is not None: |
| 90 | return self._accept(request) |
| 91 | return result |
| 92 | |
| 93 | def _accept(self, request): |
| 94 | request.csrf_processing_done = True |
nothing calls this directly
no test coverage detected