haskell-servant / haskell-servant/servant
Optionally use Context for Auth errors
- Dominant language
- Haskell
- Stars
- 2k
- Forks
- 427
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 5
Description
In the previous `servant-auth` repo, we had a [PR](https://github.com/haskell-servant/servant-auth/pull/168) for switching to errors based on the context (much like the rest of the servant ecosystem). `throwAll` is a bit of a hack (and currently doesn't work with other monads without a bit of extra work.)
@domenkozar pointed out that sometimes we *want* the authentication result in the handlers, rather than to fail. So I think a version of the PR above, but with a `Strict`/`Lenient` (or `Required`/`Optional`? Or another, auth-specific combinator?) option, could be good? Then `Auth` would become a type synonym for `Auth' Lenient`, and we'd retain backwards compatibility.
Contributor guide
Research direction
Review the linked servant-auth PR and the current Auth, Auth' and throwAll entry points. Decide the strict/lenient or required/optional API and context-based error behavior while preserving Auth backwards compatibility; done means the chosen design is implemented with its behavior covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- authentication, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100