servant-auth-token-0.4.1.1: Servant based API and server for token based authorisation

Copyright(c) Anton Gushcha 2016
LicenseMIT
Maintainerncrashed@gmail.com
Stabilityexperimental
PortabilityPortable
Safe HaskellNone
LanguageHaskell2010

Servant.Server.Auth.Token.Restore

Description

 

Synopsis

Documentation

getRestoreCode :: HasStorage m => IO RestoreCode -> UserImplId -> UTCTime -> m RestoreCode Source #

Get current restore code for user or generate new

guardRestoreCode :: AuthHandler m => UserImplId -> RestoreCode -> m () Source #

Throw if the restore code isn't valid for given user, if valid, invalidates the code

sendRestoreCode :: AuthHandler m => RespUserInfo -> RestoreCode -> m () Source #

Send restore code to the user' email