File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,9 +5,13 @@ v3 has many incompatibilities with v2. To see the full list of differences betwe
55v2 and v3, please read the Changes-v3.md file (https://github.com/lestrrat-go/jwx/blob/develop/v3/Changes-v3.md)
66
77v3.0.8 UNRELEASED
8- * [jwe/jwebb] (EXPERIMENTAL) Add low-level functions for JWE operations
8+ * [jwe/jwebb] (EXPERIMENTAL) Add low-level functions for JWE operations.
99 * [jws/jwsbb] (EXPERIMENTAL/BREAKS COMPATIBILITY) Add io.Reader parameter
10- so your choice of source of randomness can be passed. Defaults to crypto/rand.Reader
10+ so your choice of source of randomness can be passed. Defaults to crypto/rand.Reader.
11+ Function signatures around jwsbb.Sign() now accept an addition `rr io.Reader`,
12+ which can be nil for 99% of use cases.
13+ * [jws/jwsbb] Add HeaderParse([]byte), where it is expected that the header
14+ is already in its base64 decoded format.
1115
1216v3.0.7 16 Jun 2025
1317 * [jws/jwsbb] (EXPERIMENTAL) Add low-level fast access to JWS headers in compact
Original file line number Diff line number Diff line change @@ -40,6 +40,15 @@ func HeaderParseCompact(buf []byte) Header {
4040 if err != nil {
4141 return & header {err : err }
4242 }
43+ return HeaderParse (decoded )
44+ }
45+
46+ // HeaderParse parses a JWS header from a byte slice containing the decoded JSON.
47+ // You will need to call HeaderGet* functions to extract the values from the header.
48+ //
49+ // Unlike HeaderParseCompact, this function does not perform any base64 decoding.
50+ // This function is experimental and may change or be removed in the future.
51+ func HeaderParse (decoded []byte ) Header {
4352 var p fastjson.Parser
4453 v , err := p .ParseBytes (decoded )
4554 if err != nil {
You can’t perform that action at this time.
0 commit comments