Skip to content

Commit

Permalink
Add incomplete list of changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lestrrat committed Oct 27, 2023
1 parent 13c0f3d commit 90bd4bb
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions Changes-v3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Incompatible Changes from v2 to v3

These are changes that are incompatible with the v2.x.x version.

* [Detailed List of Changes](#detailed-list-of-changes) - A comprehensive list of changes from v2 to v3

# Detailed list of changes

## Module

* This module now requires Go 1.20.x

* All `xxx.Get()` methods have been changed from `Get(string) (interface{}, error)` to
`Get(string, interface{}) error`, where the second argument should be a pointer
to the storage destination of the field.

## JWS

* Iterators have been completely removed.
* As a side effect of removing iterators, some methods such as `Copy()` lost the
`context.Context` argument

## JWE

* Iterators have been completely removed.
* As a side effect of removing iterators, some methods such as `Copy()` lost the
`context.Context` argument

## JWK

* Iterators have been completely removed.

* `jwk/x25519` has been removed. To use X25519 keys, use `(crypto/ecdh).PrivateKey` and
`(crypto/ecdh).PublicKey`. Similarly, internals have been reworked to use `crypto/ecdh`

* Parsing has completely been reworked. It is now possible to add your own `jwk.KeyParser`
to generate a custom `jwk.Key` that this library may not natively support. Also see
`jwk.RegisterKeyParser()`

* `jwk.KeyProbe` has been added to aid probing the JSON message. This is used to
guess the type of key described in the JSON message before deciding which concrete
type to instantiate, and aids implementing your own `jwk.KeyParser`. Also see
`jwk.RegisterKeyProbe()`

* Conversion between raw keys and `jwk.Key` can be customized using `jwk.KeyConverter`.
Also see `jwk.RegisterKeyConverter()`

* Added `jwk/ecdsa` to keep track of which curves are available for ECDSA keys.

0 comments on commit 90bd4bb

Please sign in to comment.