fix header conversion from hex
This commit is contained in:
parent
0ab20e57e9
commit
f2d0384c33
1 changed files with 2 additions and 1 deletions
|
@ -11,6 +11,7 @@ import Servant.Server.Experimental.Auth
|
||||||
import Data.Time.Clock
|
import Data.Time.Clock
|
||||||
|
|
||||||
import Data.ByteString.Random
|
import Data.ByteString.Random
|
||||||
|
import Data.ByteString.Base16 (decode)
|
||||||
|
|
||||||
import Data.Set (empty)
|
import Data.Set (empty)
|
||||||
|
|
||||||
|
@ -88,7 +89,7 @@ authHandler conn = mkAuthHandler handler
|
||||||
let headers = requestHeaders req
|
let headers = requestHeaders req
|
||||||
res <- case lookup "Authorization" headers of
|
res <- case lookup "Authorization" headers of
|
||||||
Just hh -> do
|
Just hh -> do
|
||||||
validateToken conn hh
|
validateToken conn (fst $ decode hh)
|
||||||
_ ->
|
_ ->
|
||||||
return Nothing
|
return Nothing
|
||||||
return res
|
return res
|
||||||
|
|
Loading…
Reference in a new issue