-
Notifications
You must be signed in to change notification settings - Fork 37
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
Support BasicAuth combinator (servant 0.5 support) #34
Comments
Any work been done on this? I got stuck on this issue and don't know how to solve it. |
I think you can just use
Which you might mention in the You might also want to automatically add possible responses: |
Aha, thanks for the pointer. I was trying to generate the swagger documentation for an API that contained BasicAuth. Now I just put it outside. |
I just realized that by putting the Authorization outside of the documented API I lose the ability to have user dependent access levels. Is there some solution for this? |
What do you mean by "user dependent access levels"? |
@tommyengstrom BTW, I'm available on IRC #servant channel if you want more live discussion! |
What I did was to define on api, lets call it SecureAPI, without any authorization. This API I can then generate swagger documentation for without running in to the issue of the BasicAuth combinator not being supported. Then I did someting like: ... But now the I don't have the ability to restrict access with more granularity, e.g. only allowing access to information about your data. I'll join the IRC channel after lunch. |
Given that servant-auth is going to replace the old authentication I recommend closing this in favor of https://github.com/haskell-servant/servant-auth/blob/master/servant-auth-swagger/src/Servant/Auth/Swagger.hs#L45 |
Ensure ranges are respected during updates as well
Hi, Thanks in advance! |
More information here: https://haskell-servant.github.io/posts/2016-03-19-servant-0.5-release.html#basic-auth
The text was updated successfully, but these errors were encountered: