Created
May 11, 2015 19:22
-
-
Save codedmart/0aca0ed097840852159c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type AuthTokenAPI = | |
| WithAuthToken :> ( | |
| "private" :> Get String | |
| :<|> "private" :> Post String | |
| ) | |
| api :: Proxy API | |
| api = Proxy | |
| authTokenServer :: Pool DBHandle -> Server AuthTokenAPI | |
| authTokenServer h = | |
| (checkAuth, | |
| getPrivate | |
| :<|> postPrivate | |
| ) | |
| where | |
| getPrivate = return "Private Get" | |
| postPrivate = return "Private Post" | |
| checkAuth :: TokenLookup | |
| checkAuth = checkAuthToken h |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment