0001-api-respect-DRF-s-API-in-check-password-69335.patch
src/authentic2/api_views.py | ||
---|---|---|
1396 | 1396 |
for authenticator in self.get_authenticators(): |
1397 | 1397 |
if hasattr(authenticator, 'authenticate_credentials'): |
1398 | 1398 |
try: |
1399 |
user, dummy_oidc_client = authenticator.authenticate_credentials(
|
|
1399 |
user_auth_tuple = authenticator.authenticate_credentials(
|
|
1400 | 1400 |
username, password, request=request |
1401 | 1401 |
) |
1402 |
result['result'] = 1 |
|
1403 |
if hasattr(user, 'oidc_client'): |
|
1404 |
result['oidc_client'] = True |
|
1405 |
break |
|
1402 |
if user_auth_tuple is not None: |
|
1403 |
user, dummy_oidc_client = user_auth_tuple |
|
1404 |
result['result'] = 1 |
|
1405 |
if hasattr(user, 'oidc_client'): |
|
1406 |
result['oidc_client'] = True |
|
1407 |
break |
|
1406 | 1408 |
except AuthenticationFailed as exc: |
1407 | 1409 |
result['result'] = 0 |
1408 | 1410 |
result['errors'] = [exc.detail] |
1411 | ||
1412 |
if not result: |
|
1413 |
result['result'] = 0 |
|
1414 |
result['errors'] = 'no authentication suceeded' |
|
1415 | ||
1409 | 1416 |
return result, status.HTTP_200_OK |
1410 | 1417 | |
1411 | 1418 | |
1412 |
- |