packages feed

keyring 0.1.0.4 → 0.1.0.5

raw patch · 5 files changed

+30/−29 lines, 5 filesdep ~basesetup-changed

Dependency ranges changed: base

Files

CHANGES.md view
@@ -1,25 +1,24 @@-0.1.0.4 (Apr 30, 2015)-======================+# 0.1.0.5 (Feb 20, 2017) +- Add support for GHC 8++# 0.1.0.4 (Apr 30, 2015)+ - Add support for GHC 7.10 -0.1.0.3 (Apr 12, 2014)-======================+# 0.1.0.3 (Apr 12, 2014)  - Add support for GHC 7.8 -0.1.0.2 (Apr 11, 2014)-======================+# 0.1.0.2 (Apr 11, 2014)  - Drop aggressive optimization flags -0.1.0.1 (Apr 2, 2014)-=====================+# 0.1.0.1 (Apr 2, 2014)  - Fix `IOError` if `$XDG_CURRENT_DESKTOP` is missing -0.1.0.0 (Apr 1, 2014)-=====================+# 0.1.0.0 (Apr 1, 2014)  - Initial release - Add support for KDE KWallet and OS X Keychain
Example.hs view
@@ -20,15 +20,14 @@  module Main where -import System.Keyring (Service(..),Username(..),Password(..)-                      ,getPassword,setPassword-                      ,KeyringError)+import System.Keyring+       (Service(..), Username(..), Password(..), getPassword, setPassword,+        KeyringError)  import Control.Exception (catch)-import Control.Monad (liftM) import Data.Version (showVersion) import System.Exit (exitFailure)-import System.IO (hPutStrLn,hPrint,hFlush,stderr,stdout)+import System.IO (hPutStrLn, hPrint, hFlush, stderr, stdout) import Text.Printf (printf)  import Paths_keyring (version)@@ -43,23 +42,25 @@ service = Service "haskell-keyring-example"  handleKeyringError :: KeyringError -> IO ()-handleKeyringError exc =-  hPrint stderr exc >> exitFailure+handleKeyringError exc = hPrint stderr exc >> exitFailure  roundTrip :: Username -> IO () roundTrip username = do-   password <- ask "A password (VISIBLE): "-   setPassword service username (Password password)-   result <- getPassword service username-   case result of-     (Just (Password storedPassword)) -> do-       let matching = if password == storedPassword then "ok" else "MISMATCH"-       printf "Password in keyring: %s (%s)\n" storedPassword matching-     Nothing -> hPutStrLn stderr "Error: Password NOT saved!" >> exitFailure+  password <- ask "A password (VISIBLE): "+  setPassword service username (Password password)+  result <- getPassword service username+  case result of+    (Just (Password storedPassword)) -> do+      let matching =+            if password == storedPassword+              then "ok"+              else "MISMATCH"+      printf "Password in keyring: %s (%s)\n" storedPassword matching+    Nothing -> hPutStrLn stderr "Error: Password NOT saved!" >> exitFailure  tryGetPassword :: IO () tryGetPassword = do-  username <- liftM Username (ask "A username: ")+  username <- fmap Username (ask "A username: ")   password <- getPassword service username   case password of     (Just (Password pw)) -> putStr "Your Password: " >> putStrLn pw
README.md view
@@ -1,6 +1,7 @@ haskell-keyring =============== +![Unmaintained](https://img.shields.io/maintenance/yes/2015.svg) [![Available on Hackage][badge-hackage]][hackage] [![License MIT][badge-license]][license] [![Build Status][badge-travis]][travis]
Setup.hs view
keyring.cabal view
@@ -1,5 +1,5 @@ name:                keyring-version:             0.1.0.4+version:             0.1.0.5 synopsis:            Keyring access description:   keyring provides access to the system's keyring to securely store passwords.@@ -35,7 +35,7 @@ source-repository this   type:              git   location:          https://github.com/lunaryorn/haskell-keyring.git-  tag:               0.1.0.4+  tag:               0.1.0.5  flag AllBackends   description:         Try to build as many backends as possible@@ -52,7 +52,7 @@   ghc-options:         -Wall   exposed-modules:     System.Keyring   other-modules:       System.Keyring.Types-  build-depends:       base >=4.6 && <4.9+  build-depends:       base >=4.6 && <4.10   default-language:    Haskell2010    if os(darwin)