@@ -22,7 +22,8 @@ class ClientAuthRequest(BaseModel):
2222 """
2323 Model for client authentication request body.
2424
25- Corresponds to ClientAuthenticatedRequestSchema in src/server/auth/middleware/clientAuth.ts
25+ Corresponds to ClientAuthenticatedRequestSchema in
26+ src/server/auth/middleware/clientAuth.ts
2627 """
2728
2829 client_id : str
@@ -31,12 +32,14 @@ class ClientAuthRequest(BaseModel):
3132
3233class ClientAuthenticator :
3334 """
34- ClientAuthenticator is a callable which validates requests from a client application,
35+ ClientAuthenticator is a callable which validates requests from a client
36+ application,
3537 used to verify /token and /revoke calls.
36- If, during registration, the client requested to be issued a secret, the authenticator
37- asserts that /token and /register calls must be authenticated with that same token.
38- NOTE: clients can opt for no authentication during registration, in which case this logic
39- is skipped.
38+ If, during registration, the client requested to be issued a secret, the
39+ authenticator asserts that /token and /register calls must be authenticated with
40+ that same token.
41+ NOTE: clients can opt for no authentication during registration, in which case this
42+ logic is skipped.
4043 """
4144 def __init__ (self , clients_store : OAuthRegisteredClientsStore ):
4245 """
@@ -53,7 +56,8 @@ async def __call__(self, request: ClientAuthRequest) -> OAuthClientInformationFu
5356 if not client :
5457 raise InvalidClientError ("Invalid client_id" )
5558
56- # If client from the store expects a secret, validate that the request provides that secret
59+ # If client from the store expects a secret, validate that the request provides
60+ # that secret
5761 if client .client_secret :
5862 if not request .client_secret :
5963 raise InvalidClientError ("Client secret is required" )
0 commit comments