a2a.client.auth.credentials moduleÂķ
- class a2a.client.auth.credentials.CredentialServiceÂķ
Bases:
ABCAn abstract service for retrieving credentials.
- abstractmethod async get_credentials(security_scheme_name: str, context: ClientCallContext | None) str | NoneÂķ
Retrieves a credential (e.g., token) for a security scheme.
- class a2a.client.auth.credentials.InMemoryContextCredentialStoreÂķ
Bases:
CredentialServiceA simple in-memory store for session-keyed credentials.
This class uses the âsessionIdâ from the ClientCallContext state to store and retrieve credentialsâĶ
- async get_credentials(security_scheme_name: str, context: ClientCallContext | None) str | NoneÂķ
Retrieves credentials from the in-memory store.
- Parameters:
security_scheme_name â The name of the security scheme.
context â The client call context.
- Returns:
The credential string, or None if not found.
- async set_credentials(session_id: str, security_scheme_name: str, credential: str) NoneÂķ
Method to populate the store.