Skip to content
This repository has been archived by the owner on Oct 29, 2021. It is now read-only.

support writing custom combinators for authorization #5

Closed
soenkehahn opened this issue Oct 18, 2016 · 2 comments
Closed

support writing custom combinators for authorization #5

soenkehahn opened this issue Oct 18, 2016 · 2 comments

Comments

@soenkehahn
Copy link
Contributor

The given Auth combinator takes care of authentication. It would be nice if servant-auth (or servant) allowed to easily write a custom combinator MyAuth that used servant-auth-server for authentication, but then also took care of authorization, where

Server (MyAuth :> api) ~ MyUser -> Server api

The HasServer instance would yield 401s for missing or invalid authentication and 403 for insufficient privileges.

@sordina
Copy link
Contributor

sordina commented May 30, 2017

Yes this would be a great way to not have to littler authz code throughout routes. Even simple things like expiring tokens.

@domenkozar
Copy link
Collaborator

Closing as duplicate of #73 (as it has more info)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants