-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better verifiers #11
Comments
The MonadIO constraint is not that terrible in practice (a pure version alongside the IO would still be nice). I'm not sure what a new monad transformer would bring. For verifiers that need access to other caveats, I first build verifiers by inspecting caveats, which works okay. Maybe giving access to the other verifiers in a zipper fashion would be nice indeed. My main gripe with the verifiers currently is that |
Something like
would improve things a lot. Having a separate type for macaroon validation (with |
Another idea (even though I realize it's a bit more far-fetched) would be to add |
@jtanguy what do you think about these ideas? |
I do like the changes to the |
That would be a departure from the rest of the macaroons libraries (which I'm not specifically against), and so if the need to have multiple-step macaroon verification arises, that would be a good opportunity to contribute back these propositions to the broader macaroons community. |
Yeah the |
I just would like this to be opt-in |
I'm trying out the new data types I've proposed, it works quite well and it allows a significant cleanup of the validation code. |
Those 2 quotes let me believe we should add examples in the library to illustrate those various use-cases, don't you both think? |
You may find it funny, but I've given some more thought to this, and I don't think that multi-step validation is necessary for our use case anymore (since we're already accumulating verifiers). I'll give a shot at merging the two steps to see how it goes. |
The verifier logic could benefit from a small refactoring, mainly from two things:
MonadIO m
requirement and introduce a VerifierM monad transformer.ListZipper
from this article from Dave Laing about ComonadsWhat are your thoughts about it @ptitfred @clementd-fretlink ?
The text was updated successfully, but these errors were encountered: