diff options
author | Joey Hess <joey@kitenet.net> | 2014-04-29 18:01:14 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-04-29 18:08:02 -0400 |
commit | e7bb1e85fbfa7b691ed4248cc0359a87cb2fb71e (patch) | |
tree | ae6519ac6c37251d6de3e973ee4e160effcb1ee2 /Assistant/Monad.hs | |
parent | bb925fe8111b5e807942d1fdd6dc079e4953e905 (diff) |
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.
Diffstat (limited to 'Assistant/Monad.hs')
-rw-r--r-- | Assistant/Monad.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Assistant/Monad.hs b/Assistant/Monad.hs index 350e3d33b..5b3f5abb4 100644 --- a/Assistant/Monad.hs +++ b/Assistant/Monad.hs @@ -44,6 +44,7 @@ import Assistant.Types.Buddies import Assistant.Types.NetMessager import Assistant.Types.ThreadName import Assistant.Types.RemoteControl +import Assistant.Types.CredPairCache newtype Assistant a = Assistant { mkAssistant :: ReaderT AssistantData IO a } deriving ( @@ -70,6 +71,7 @@ data AssistantData = AssistantData , buddyList :: BuddyList , netMessager :: NetMessager , remoteControl :: RemoteControl + , credPairCache :: CredPairCache } newAssistantData :: ThreadState -> DaemonStatusHandle -> IO AssistantData @@ -89,6 +91,7 @@ newAssistantData st dstatus = AssistantData <*> newBuddyList <*> newNetMessager <*> newRemoteControl + <*> newCredPairCache runAssistant :: AssistantData -> Assistant a -> IO a runAssistant d a = runReaderT (mkAssistant a) d |