findBestJwsProcessorAndMerge

Looks up the existing BaseJwsProcessor for the algorithm and key ID in key's identifier, then merges key with that existing processor.

When the existing processor is also a SigningKey, the merge is performed at the key level, producing a SigningKey.SigningKeyPair. Otherwise the generic processor combining mechanism is used.

Return

a BaseJwsProcessor incorporating the new key, merged with any previously registered key

Parameters

key

the signing key whose algorithm and key ID are used to locate an existing processor

Throws

if a signing key of the same type is already registered for the same algorithm and key ID