From 2bbb1a78ddbc2765697f478321adfaa92c625c87 Mon Sep 17 00:00:00 2001 From: Daisuke Maki Date: Mon, 20 Nov 2023 12:41:32 +0900 Subject: [PATCH] Tweak documentation --- Changes | 4 ++-- jws/signer.go | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Changes b/Changes index 14d26bd7f..9026242bd 100644 --- a/Changes +++ b/Changes @@ -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. diff --git a/jws/signer.go b/jws/signer.go index 39da72863..434d51bc2 100644 --- a/jws/signer.go +++ b/jws/signer.go @@ -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` @@ -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.