Remove the current authenticated user in the request which is invalid but only if the user is authenticated via the RemoteUserBackend.
(self, request)
| 246 | return request.META[self.header] |
| 247 | |
| 248 | def _remove_invalid_user(self, request): |
| 249 | """ |
| 250 | Remove the current authenticated user in the request which is invalid |
| 251 | but only if the user is authenticated via the RemoteUserBackend. |
| 252 | """ |
| 253 | try: |
| 254 | stored_backend = load_backend( |
| 255 | request.session.get(auth.BACKEND_SESSION_KEY, "") |
| 256 | ) |
| 257 | except ImportError: |
| 258 | # backend failed to load |
| 259 | auth.logout(request) |
| 260 | else: |
| 261 | if isinstance(stored_backend, RemoteUserBackend): |
| 262 | auth.logout(request) |
| 263 | |
| 264 | async def _aremove_invalid_user(self, request): |
| 265 | """ |
no test coverage detected