Attempt to authenticate the request using each authentication instance in turn.
(self)
| 376 | return (parsed, empty_files) |
| 377 | |
| 378 | def _authenticate(self): |
| 379 | """ |
| 380 | Attempt to authenticate the request using each authentication instance |
| 381 | in turn. |
| 382 | """ |
| 383 | for authenticator in self.authenticators: |
| 384 | try: |
| 385 | user_auth_tuple = authenticator.authenticate(self) |
| 386 | except exceptions.APIException: |
| 387 | self._not_authenticated() |
| 388 | raise |
| 389 | |
| 390 | if user_auth_tuple is not None: |
| 391 | self._authenticator = authenticator |
| 392 | self.user, self.auth = user_auth_tuple |
| 393 | return |
| 394 | |
| 395 | self._not_authenticated() |
| 396 | |
| 397 | def _not_authenticated(self): |
| 398 | """ |
no test coverage detected