Created
May 15, 2018 21:16
-
-
Save skeet70/dc995d5bdd9770c4e17f69de2c1c7abf to your computer and use it in GitHub Desktop.
This file contains 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
authHandler :: Manager -> AuthHandler Request User | |
authHandler manager = mkAuthHandler handler | |
where | |
throw401 msg = | |
throwError $ err401 {errBody = "Unauthorized:" <> msg <> " ."} | |
handler req = | |
either | |
throw401 | |
(getRevvUser manager) | |
(lookupAccessToken $ queryString req) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment