Implement External KeyStore Support
The keys option in Context may may be an instance of
HttpSignature::KeyStore or other object
that conforms to its API.
I'm all for permitting alternate key stores, but I don't like that they need to subclass the built-in one; I'd prefer it to be an implicit interface. That makes it a bit trickier to guarantee backwards compatibility, though.
How wrapping it in the built-in Keystore only if it's a Hash, otherwise passing it through and assuming it conforms to the implicit interface?
You don't have to subclass it. That was just for expediency in testing. Anything that supports fetch basically will work, as long as it returns Key or Key-like things.
Happy to change that around. Originally I was going to just pass in a hash-like object rather than an overloaded keystore but the built-in keystore iterates over the entire hash creating keys.
This is basically to use a DB model so we can have all our user access keys there and look them up per request.