From 3835a9e7442ae33aa40281597e90ae7a2bbfceba Mon Sep 17 00:00:00 2001 From: Daisuke Maki Date: Thu, 7 Mar 2024 10:53:38 +0900 Subject: [PATCH 1/2] Fix documentation This was probably introduced by a search-and-replace --- jws/options.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jws/options.go b/jws/options.go index a6cc472c9..d8ab720a4 100644 --- a/jws/options.go +++ b/jws/options.go @@ -136,12 +136,12 @@ func WithKey(alg jwa.KeyAlgorithm, key interface{}, options ...WithKeySuboption) // specified by the caller. // // To work with keys/JWS messages not having a `kid` field, you may specify -// the suboption `WithKeySetRequired` via `jws.WithKeySetSuboption(jws.WithKeySetRequireKid(false))`. +// the suboption `WithKeySetRequired` via `jws.WithKey(key, jws.WithKeySetRequireKid(false))`. // This will allow the library to proceed without having to match the `kid` field. // // However, it will still check if the `alg` fields in the JWS message and the key(s) // match. If you must work with JWS messages that do not have an `alg` field, -// you will need to use `jws.WithKeySetSuboption(jws.WithInferAlgorithm(true))`. +// you will need to use `jws.WithKeySet(key, jws.WithInferAlgorithm(true))`. // // See the documentation for `WithInferAlgorithm()` for more details. func WithKeySet(set jwk.Set, options ...WithKeySetSuboption) VerifyOption { From d606c95c133d59d58f5171d30993ea10bbea6976 Mon Sep 17 00:00:00 2001 From: Daisuke Maki Date: Thu, 7 Mar 2024 10:55:00 +0900 Subject: [PATCH 2/2] one more doc fix --- jws/options.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jws/options.go b/jws/options.go index d8ab720a4..55578e6db 100644 --- a/jws/options.go +++ b/jws/options.go @@ -136,7 +136,7 @@ func WithKey(alg jwa.KeyAlgorithm, key interface{}, options ...WithKeySuboption) // specified by the caller. // // To work with keys/JWS messages not having a `kid` field, you may specify -// the suboption `WithKeySetRequired` via `jws.WithKey(key, jws.WithKeySetRequireKid(false))`. +// the suboption `WithKeySetRequired` via `jws.WithKey(key, jws.WithRequireKid(false))`. // This will allow the library to proceed without having to match the `kid` field. // // However, it will still check if the `alg` fields in the JWS message and the key(s)