Skip to content

Optionally use Context for Auth errors #1585

@jkarni

Description

@jkarni

In the previous servant-auth repo, we had a PR 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions