Skip to content

Commit

Permalink
Tweak documentation (#1018)
Browse files Browse the repository at this point in the history
  • Loading branch information
lestrrat authored Nov 20, 2023
1 parent ee031a0 commit 9156743
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ Changes
v2 has many incompatibilities with v1. To see the full list of differences between
v1 and v2, please read the Changes-v2.md file (https://github.com/lestrrat-go/jwx/blob/develop/v2/Changes-v2.md)

v2.0.17 UNRELEASED
v2.0.17 20 Nov 2023
[Bug Fixes]
* [jws] Previously, `jws.UnregisterSigner` did not remove the previous signer instance when
the signer was registered and unregistered multiple times. This has been fixed.
the signer was registered and unregistered multiple times (#1016). This has been fixed.

[New Features]
* [jwe] (EXPERIMENTAL) `jwe.WithCEK` has been added to extract the content encryption key (CEK) from the Decrypt operation.
Expand Down
6 changes: 4 additions & 2 deletions jws/signer.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ var muSignerDB sync.RWMutex
var signerDB map[jwa.SignatureAlgorithm]SignerFactory

// RegisterSigner is used to register a factory object that creates
// Signer objects based on the given algorithm.
// Signer objects based on the given algorithm. Previous object instantiated
// by the factory is discarded.
//
// For example, if you would like to provide a custom signer for
// jwa.EdDSA, use this function to register a `SignerFactory`
Expand All @@ -40,7 +41,8 @@ func RegisterSigner(alg jwa.SignatureAlgorithm, f SignerFactory) {
}

// UnregisterSigner removes the signer factory associated with
// the given algorithm.
// the given algorithm, as well as the signer instance created
// by the factory.
//
// Note that when you call this function, the algorithm itself is
// not automatically unregistered from the known algorithms database.
Expand Down

0 comments on commit 9156743

Please sign in to comment.