Skip to content
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

Need to expose verification errors to callers #14

Open
jaxley opened this issue Jul 26, 2019 · 0 comments
Open

Need to expose verification errors to callers #14

jaxley opened this issue Jul 26, 2019 · 0 comments

Comments

@jaxley
Copy link
Contributor

jaxley commented Jul 26, 2019

Currently, the implementation generates fairly-detailed verification errors objects based on what verification failed. But the current API keeps those entirely internal. This prevents callers from determining what caused an authorization failure.

A common use case would be that a server would need to be able to communicate to a caller that a macaroon or discharge macaroon has expired and they need to obtain a new one. That's opaque right now because .isValid and .assertValid only generate booleans.

Debugging is also a challenge since I've had to put breakpoints in the code in order to determine which failure occurred (whether expected or not). Would also help unit testability to be able to ensure that validations occur because of expected conditions and not coincidence or serendipity.

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

No branches or pull requests

1 participant