@@ -20,7 +20,8 @@ AgentWritApp(
2020 client_id: str ,
2121 client_secret: str ,
2222 * ,
23- timeout: float = 30.0 ,
23+ timeout: float = 10.0 ,
24+ user_agent: str | None = None ,
2425)
2526```
2627
@@ -31,7 +32,8 @@ Creates an app instance. Authentication is lazy — the SDK does not contact the
3132| ` broker_url ` | ` str ` | required | Base URL of the AgentWrit broker (e.g., ` http://localhost:8080 ` ) |
3233| ` client_id ` | ` str ` | required | Application identifier from broker registration |
3334| ` client_secret ` | ` str ` | required | Application secret. Never logged, printed, or included in any SDK output. |
34- | ` timeout ` | ` float ` | ` 30.0 ` | HTTP request timeout in seconds |
35+ | ` timeout ` | ` float ` | ` 10.0 ` | HTTP request timeout in seconds |
36+ | ` user_agent ` | ` str \| None ` | ` None ` | Custom User-Agent header. If ` None ` , uses the SDK default. |
3537
3638### create_agent()
3739
@@ -89,6 +91,14 @@ Shortcut for `agentwrit.validate(app.broker_url, token)`.
8991
9092** Returns:** ` ValidateResult `
9193
94+ ### close()
95+
96+ ``` python
97+ app.close() -> None
98+ ```
99+
100+ Closes the underlying HTTP transport. Call this when you're done with the app to release connections.
101+
92102---
93103
94104## Agent
@@ -239,7 +249,7 @@ from agentwrit import AgentClaims
239249
240250| Field | Type | Description |
241251| -------| ------| -------------|
242- | ` iss ` | ` str ` | Issuer (always ` "agentwrit" ` ) |
252+ | ` iss ` | ` str ` | Issuer — identifies the broker that issued the token |
243253| ` sub ` | ` str ` | Subject — SPIFFE URI of the agent |
244254| ` aud ` | ` list[str] ` | Audience (may be empty) |
245255| ` exp ` | ` int ` | Expiration (Unix timestamp) |
0 commit comments