It's very easy to get the Algorithm from my config file, since you've kindly provided a serde::de::Deserialize trait on it. While it's beautiful being able to write a json config like "https://myissuer.com": { algo: "RS256", pubkey: "../mykey.pub" }, building the actual EncodingKey out of that gets ugly. it'd be lovely if there were something like:
I thought about that a while back but I didn't like that you could end up with errors that could be avoided by the current functions; the NoPemForThis in your example.
It's very easy to get the Algorithm from my config file, since you've kindly provided a
serde::de::Deserialize
trait on it. While it's beautiful being able to write a json config like"https://myissuer.com": { algo: "RS256", pubkey: "../mykey.pub" }
, building the actual EncodingKey out of that gets ugly. it'd be lovely if there were something like:As it stands I don't even have access to
family()
, so I can't get it to do this automatically.