add CredPair cache
Note that this does not yet use SecureMem. It would probably make sense for the Password part of a CredPair to use SecureMem, and making that change is better than passing in a String and having it converted to SecureMem in this code.
This commit is contained in:
parent
89bd493e33
commit
ac98853f05
4 changed files with 77 additions and 1 deletions
18
Assistant/Types/CredPairCache.hs
Normal file
18
Assistant/Types/CredPairCache.hs
Normal file
|
@ -0,0 +1,18 @@
|
|||
{- git-annex assistant CredPair cache.
|
||||
-
|
||||
- Copyright 2014 Joey Hess <joey@kitenet.net>
|
||||
-
|
||||
- Licensed under the GNU GPL version 3 or higher.
|
||||
-}
|
||||
|
||||
module Assistant.Types.CredPairCache where
|
||||
|
||||
import Types.Creds
|
||||
|
||||
import Control.Concurrent
|
||||
import qualified Data.Map as M
|
||||
|
||||
type CredPairCache = MVar (M.Map Login Password)
|
||||
|
||||
newCredPairCache :: IO CredPairCache
|
||||
newCredPairCache = newMVar M.empty
|
Loading…
Add table
Add a link
Reference in a new issue