Skip to content

Conversation

@waynerobinson
Copy link

The keys option in Context may may be an instance of
HttpSignature::KeyStore or other object
that conforms to its API.

Context `keys` option may may be an instance of
`HttpSignature::KeyStore` or other object
that conforms to its API.
@pda
Copy link
Collaborator

pda commented Oct 2, 2015

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?

@waynerobinson
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants