You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6e68062
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: AGENTS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ This file provides repository-specific guidance for AI coding agents working on
27
27
- Validate before lossy conversion: preserve parameter presence, types, and values until the relevant checks are complete.
28
28
- Preserve protocol-level type distinctions across parsing, serialization, public APIs, and comparisons. When changing supported types, test round trips and assess compatibility implications.
29
29
- Review untrusted-input paths for possible panics, including unchecked type assertions, nil dereferences, and dependency behavior. Malformed protocol input should produce controlled errors.
30
-
-Respect the API contracts for Structured Fields component identifiers and any supported simplified configuration syntax.
30
+
-Public component identifier strings in configuration and results use serialized Structured Fields String Items.
31
31
- Never relax signature, component, timestamp, nonce, algorithm, or key validation merely to satisfy tests. Assess security and compatibility implications explicitly.
Copy file name to clipboardExpand all lines: README.md
+16-26Lines changed: 16 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,16 +18,6 @@ For API details and option semantics, see the [Go reference](https://pkg.go.dev/
18
18
19
19
## Usage
20
20
21
-
> [!NOTE]
22
-
> Component identifiers are represented as [Structured Fields Items](https://www.rfc-editor.org/rfc/rfc9421.html#section-2.5), with quoted component names (for example, `"@method"` or `"content-digest";req`). For convenience, configuration options such as `WithComponents` also accept a simplified form that omits the quotes around the component name. Both forms are equivalent:
23
-
>
24
-
> ```go
25
-
> httpsig.WithComponents(`"@method"`, `"content-digest";req`) // Structured Fields form
26
-
> httpsig.WithComponents("@method", "content-digest;req") // simplified form
27
-
> ```
28
-
>
29
-
> When parsing an `Accept-Signature` header, `httpsig` returns the serialized Structured Fields form in `SignatureRequest.Components`. These values can be passed directly to `WithComponents`.
30
-
31
21
### Standalone Signing and Verification
32
22
33
23
The following snippets show two independent flows: signing an outgoing request and verifying a received response. They assume application-provided keys and other values; routine error handling is abbreviated.
0 commit comments