MCPcopy Create free account
hub / github.com/authlib/authlib / authenticate_none

Function authenticate_none

authlib/oauth2/rfc6749/authenticate_client.py:93–102  ·  view source on GitHub ↗

Authenticate public client by ``none`` method. The client does not have a client secret.

(query_client, request)

Source from the content-addressed store, hash-verified

91
92
93def 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
105def _validate_client(query_client, client_id, status_code=400):

Callers

nothing calls this directly

Calls 2

_validate_clientFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected