delete tokens

This commit is contained in:
nek0 2014-09-05 20:40:47 +02:00
parent fec1b02780
commit 99b37beaa4

View file

@ -53,8 +53,9 @@ postLoginR = do
hexSalted <- return $ toHex salted
expected <- return $ hmacSHA1 (tokenToken token) (encodeUtf8 hexSalted)
case (fromHex' $ T.unpack hexResponse) == expected of
True ->
True -> do
-- Success!!
runDB $ delete tokenId
return $ Right savedUserId
_ ->
return $ Left ("Wrong password" :: T.Text)