Commit graph

957 commits

Author SHA1 Message Date
aaron levin
9e71d083e5 Fix post-merge build 2016-01-10 12:42:06 +01:00
aaron levin
1146d15f52 Merge branch 'shahn/config' into jkarni/config 2016-01-10 12:28:48 +01:00
aaron levin
eafc5d33bb Rename HList append from .: to .:.
Avoids conflicting with Data.Aeson.((.:))
2016-01-10 11:43:07 +01:00
aaron levin
2633c6d213 Add tags file to .gitignore 2016-01-10 11:29:44 +01:00
aaron levin
96b4ea915f Add auth support to servant-docs 2016-01-10 00:39:51 +01:00
aaron levin
f816ce30b3 Add authentication tests 2016-01-10 00:07:41 +01:00
aaron levin
9ffd709391 Add auth tests to servant-client 2016-01-09 19:15:35 +01:00
aaron levin
f9dcbdd7d4 obviate need for data families 2016-01-09 17:54:09 +01:00
aaron levin
ffeeffe745 Add auth support for servant-client 2016-01-09 17:34:27 +01:00
aaron levin
970af450dd Remove servant-server specific type from AuthProtect
the 'user' type is valid only for servant-server, so lets move it out of
the combinator. This means we need to use type families when
implementing the server.
2016-01-09 17:33:19 +01:00
Sönke Hahn
33cc9958ed Merge remote-tracking branch 'origin/master' into shahn/config
Conflicts:
	servant-server/test/Servant/ServerSpec.hs
2016-01-09 13:00:42 +01:00
Sönke Hahn
4384c1df07 remove debugging print 2016-01-09 12:34:52 +01:00
Julian Arni
357cc839b6 Merge pull request #276 from haskell-servant/jkarni/emptyWithHeaders
Consolidate verbs
2016-01-08 20:22:02 +01:00
Julian K. Arni
f9c61379c0 Refactor NoContent logic.
Now MimeRender and MimeUnrender instances are not needed.
2016-01-08 19:33:36 +01:00
Sönke Hahn
66628ca043 config: added Show instance 2016-01-08 18:15:01 +01:00
Julian K. Arni
f1b6603c52 Review fixes 2016-01-08 18:03:28 +01:00
Sönke Hahn
5c863b2043 remove unneeded instances 2016-01-08 17:25:40 +01:00
Sönke Hahn
d99bde5fcd config: remove overlapping noise 2016-01-08 17:25:15 +01:00
Julian K. Arni
3cc3c5c986 Add HasCfg typeclass.
This is largely Aaron Levin's work. But it was done in a merge commit,
        so couldn't be cherry-picked in a sensible way. Thanks Aaron!
2016-01-08 17:12:07 +01:00
Julian K. Arni
da171780b8 Tests for Config. 2016-01-08 17:12:07 +01:00
Julian K. Arni
207a807428 Add Config parameter.
This allows combinator instances to receive dynamic data that isn't
        constrained by the interface of Delayed etc.
2016-01-08 17:12:07 +01:00
aaron levin
4865114330 BasicAuth should have a tag for config
Stop relying on the realm to be the tag.
2016-01-08 13:53:27 +01:00
aaron levin
95d994a5f5 Fix basic-auth imports in servant-example 2016-01-08 12:35:11 +01:00
aaron levin
683e100aed Update auth-combinator to use new general AuthProtected 2016-01-08 12:34:57 +01:00
aaron levin
3db091db57 Export BasicAuth constructor in Servant.Server 2016-01-08 12:10:36 +01:00
aaron levin
4add914251 Specify kinds in BasicAuth and AuthProtect 2016-01-08 12:10:11 +01:00
aaron levin
752157a777 Export Basic & General Auth combinators from Servant.Server 2016-01-08 11:45:05 +01:00
aaron levin
9a94403d97 Rename AuthResult to BasicAuthResult
AuthResult is not extensible enough for more complex, homegrown
combinators
2016-01-08 11:43:58 +01:00
aaron levin
0764d9b84c Add the generalized auth combinator 2016-01-08 11:35:26 +01:00
aaron levin
38c3cb7045 Fix formatting and add more comments in basic-auth 2016-01-07 23:43:55 +01:00
aaron levin
1eed61517b Add Basic Auth example 2016-01-07 23:38:47 +01:00
aaron levin
08cfe21393 Fix broken doc tests in Internal/Auth.hs 2016-01-07 23:00:34 +01:00
aaron levin
4e6a6c0ce6 Use BasicAuth realm as its Config tag.
For a given realm, there should only be one implementation, so the realm
already serves as a unique identifier to configure BasicAuth from the
Config perspective.

This makes for less noise in the BasicAuth type.
2016-01-07 22:57:37 +01:00
aaron levin
f6bdfa3c05 Implement Basic Auth with Config Tooling
Extend the Config tooling to allow an implementation with Basic
Authentication.
2016-01-07 22:51:16 +01:00
Sönke Hahn
e007d8dc6d Merge pull request #318 from haskell-servant/jkarni/contributing
First pass at CONTRIBUTING
2016-01-07 18:30:42 +01:00
Julian K. Arni
32612c903c Review fixes 2016-01-07 17:19:31 +01:00
Julian K. Arni
783a849c67 Make NoContent still take an arg.
For consistency with other combinators, and to make using headers
        easier.
2016-01-07 14:30:08 +01:00
Julian K. Arni
574e9c48cd Export all Verb methods. 2016-01-07 13:47:08 +01:00
Julian K. Arni
bd77b4acba Verb for -mock, -js and -foreign. 2016-01-07 13:47:08 +01:00
Julian K. Arni
208bcf5986 Use Verb for servant-docs 2016-01-07 13:47:08 +01:00
Julian K. Arni
5909a6df7a Fix rebase issues. 2016-01-07 13:47:08 +01:00
Julian K. Arni
9b2d7a7b38 Remove unnecesary () AllMimeRender instance. 2016-01-07 13:47:08 +01:00
Julian K. Arni
20ae7dcc31 Update CHANGELOG for Verbs change. 2016-01-07 13:47:08 +01:00
Julian K. Arni
c6071bfb02 Don't override status code on empty body. 2016-01-07 13:47:08 +01:00
Julian K. Arni
190c75a364 Add descriptive type synonyms for success responses. 2016-01-07 13:47:07 +01:00
Julian K. Arni
cda8bcf17c Simplify verb combinators.
Create a single 'Verb' combinator with parameters for status code and
        method. Make existing combinators type synonyms of 'Verb'.
2016-01-07 13:47:07 +01:00
Julian K. Arni
832f1b985f Review fixes and note about CI. 2016-01-07 13:05:13 +01:00
Julian Arni
3d0ae36189 Merge pull request #310 from arianvp/294
Fix #294
2016-01-07 13:00:47 +01:00
Julian K. Arni
f8ea9ba8fe Add HasCfg typeclass.
This is largely Aaron Levin's work. But it was done in a merge commit,
        so couldn't be cherry-picked in a sensible way. Thanks Aaron!
2016-01-07 12:51:30 +01:00
Julian K. Arni
e9db7f651c Tests for Config. 2016-01-07 12:18:42 +01:00