delete tokens
This commit is contained in:
parent
fec1b02780
commit
99b37beaa4
1 changed files with 2 additions and 1 deletions
|
@ -53,8 +53,9 @@ postLoginR = do
|
||||||
hexSalted <- return $ toHex salted
|
hexSalted <- return $ toHex salted
|
||||||
expected <- return $ hmacSHA1 (tokenToken token) (encodeUtf8 hexSalted)
|
expected <- return $ hmacSHA1 (tokenToken token) (encodeUtf8 hexSalted)
|
||||||
case (fromHex' $ T.unpack hexResponse) == expected of
|
case (fromHex' $ T.unpack hexResponse) == expected of
|
||||||
True ->
|
True -> do
|
||||||
-- Success!!
|
-- Success!!
|
||||||
|
runDB $ delete tokenId
|
||||||
return $ Right savedUserId
|
return $ Right savedUserId
|
||||||
_ ->
|
_ ->
|
||||||
return $ Left ("Wrong password" :: T.Text)
|
return $ Left ("Wrong password" :: T.Text)
|
||||||
|
|
Loading…
Reference in a new issue