As a user of jose library, I want to load a JWK that will be used for signing,
and apply to it a function that returns a JWS header using an algorithm that
is "compatible" with the key type and size.
e.g. load a symmetric key, get HS256. Load an RSA key, get RS384.
The strongest compatible algorithm should be chosen by default.
Perhaps a companion function that allows user to further constrain the algorithm would
also be a good idea, e.g. to choose "more widely implemented" algos even if key size
supports stronger algo, based on required/recommended/recommended+ algos in RFCs.
As a user of jose library, I want to load a JWK that will be used for signing, and apply to it a function that returns a JWS header using an algorithm that is "compatible" with the key type and size.
e.g. load a symmetric key, get HS256. Load an RSA key, get RS384.
The strongest compatible algorithm should be chosen by default.
Perhaps a companion function that allows user to further constrain the algorithm would also be a good idea, e.g. to choose "more widely implemented" algos even if key size supports stronger algo, based on required/recommended/recommended+ algos in RFCs.