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

Provide a combinator for Protect that is required #4

Open
joneshf opened this issue Jul 17, 2018 · 0 comments
Open

Provide a combinator for Protect that is required #4

joneshf opened this issue Jul 17, 2018 · 0 comments

Comments

@joneshf
Copy link
Contributor

joneshf commented Jul 17, 2018

-- | A combinator for marking an endpoint as requiring OAuth2 authorization.
--
-- TODO: Because this combinator uses `Header` directly, clients using it will
-- have to pass a `Maybe Authorization`. We should see if we can make a custom
-- combinator that just takes an `Authorization`.
type Protect = Header "Authorization" Authorization

One option is to use a different combinator altogether.

Another option is to update servant to at least version 0.13. It changed the type of headers. If we specify that it's a Header' '[Strict] "Authorization" Authorization, it ought to make it required for the API.

joneshf added a commit that referenced this issue Jul 17, 2018
It's been codified as issue #4: #4.
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