Authenticate public client by ``none`` method. The client does not have a client secret.
(query_client, request)
| 91 | |
| 92 | |
| 93 | def authenticate_none(query_client, request): |
| 94 | """Authenticate public client by ``none`` method. The client |
| 95 | does not have a client secret. |
| 96 | """ |
| 97 | client_id = request.payload.client_id |
| 98 | if client_id and not request.payload.data.get("client_secret"): |
| 99 | client = _validate_client(query_client, client_id) |
| 100 | log.debug(f'Authenticate {client_id} via "none" success') |
| 101 | return client |
| 102 | log.debug(f'Authenticate {client_id} via "none" failed') |
| 103 | |
| 104 | |
| 105 | def _validate_client(query_client, client_id, status_code=400): |
nothing calls this directly
no test coverage detected