File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -99,23 +99,23 @@ def create_signature_verifier(
9999 key_provider : Callable [[str | None , str | None ], PyJWK | str | bytes ],
100100 algorithms : list [str ],
101101) -> Callable [[AgentCard ], None ]:
102- """Creates a function that verifies AgentCard signatures.
102+ """Creates a function that verifies the signatures on an AgentCard.
103+
104+ The verifier succeeds if at least one signature is valid. Otherwise, it raises an error.
103105
104106 Args:
105- key_provider: A callable that takes key-id and JSON web key url and returns the verification key.
106- algorithms: List of acceptable algorithms for verification used to prevent algorithm confusion attacks.
107+ key_provider: A callable that accepts a key ID (kid) and a JWK Set URL (jku) and returns the verification key.
108+ This function is responsible for fetching the correct key for a given signature.
109+ algorithms: A list of acceptable algorithms (e.g., ['ES256', 'RS256']) for verification used to prevent algorithm confusion attacks.
107110
108111 Returns:
109- A callable that takes an AgentCard, and raises an error if none of the signatures are valid.
112+ A function that takes an AgentCard as input , and raises an error if none of the signatures are valid.
110113 """
111114
112115 def signature_verifier (
113116 agent_card : AgentCard ,
114117 ) -> None :
115- """Verifies agent card signatures.
116-
117- Checks if at least one signature matches the key, otherwise raises an error.
118- """
118+ """Verifies agent card signatures."""
119119 if not agent_card .signatures :
120120 raise NoSignatureError ('AgentCard has no signatures to verify.' )
121121
You can’t perform that action at this time.
0 commit comments