Compare commits
7 Commits
0.3.0.2
...
d0d80223f7
| Author | SHA1 | Date | |
|---|---|---|---|
| d0d80223f7 | |||
| 180af04891 | |||
| a048e0ad8b | |||
| d3a54f19b9 | |||
| b9d52070f1 | |||
| 6585d63385 | |||
| 258ebf29fe |
@@ -1,5 +1,10 @@
|
|||||||
# Changelog for passman
|
# Changelog for passman
|
||||||
|
|
||||||
|
## 0.3.1
|
||||||
|
|
||||||
|
- set maximum version of transformers package
|
||||||
|
- allow user to specifiy a temporary master password to retrieve a password
|
||||||
|
|
||||||
## 0.3.0.2
|
## 0.3.0.2
|
||||||
|
|
||||||
- more dependency versions
|
- more dependency versions
|
||||||
|
|||||||
18
app/UI.hs
18
app/UI.hs
@@ -27,7 +27,7 @@ module UI (getMasterPass, mainMenu) where
|
|||||||
import Control.Monad (when)
|
import Control.Monad (when)
|
||||||
import Control.Monad.Trans.Class (lift)
|
import Control.Monad.Trans.Class (lift)
|
||||||
import qualified Control.Monad.Trans.State as S
|
import qualified Control.Monad.Trans.State as S
|
||||||
import Lens.Micro (over, set, (^.))
|
import Lens.Micro (over, set, (^.), (.~))
|
||||||
import Lens.Micro.Extras (view)
|
import Lens.Micro.Extras (view)
|
||||||
import System.Console.HCL
|
import System.Console.HCL
|
||||||
( Request
|
( Request
|
||||||
@@ -162,6 +162,7 @@ selectServ xs = menu "Select Service" $
|
|||||||
servMenu :: String -> S.StateT Status IO ()
|
servMenu :: String -> S.StateT Status IO ()
|
||||||
servMenu x = menu x
|
servMenu x = menu x
|
||||||
[ ( "show password", showPass x >> servMenu x )
|
[ ( "show password", showPass x >> servMenu x )
|
||||||
|
, ( "show alternate password", showAltPass x )
|
||||||
, ( "edit password", editPassMenu x )
|
, ( "edit password", editPassMenu x )
|
||||||
, ( "remove service", removeServ x )
|
, ( "remove service", removeServ x )
|
||||||
, ( "rename service", renameServ x )
|
, ( "rename service", renameServ x )
|
||||||
@@ -225,16 +226,25 @@ doEditPolicy x = withService x mainMenu $ \d -> do
|
|||||||
editPassMenu x
|
editPassMenu x
|
||||||
|
|
||||||
showPass :: String -> S.StateT Status IO ()
|
showPass :: String -> S.StateT Status IO ()
|
||||||
showPass x = do
|
showPass x = withService x
|
||||||
lift $ putStrLn ""
|
|
||||||
withService x
|
|
||||||
(lift $ putStrLn "The service could not be found in the database.") $
|
(lift $ putStrLn "The service could not be found in the database.") $
|
||||||
\d -> do
|
\d -> do
|
||||||
|
lift $ putStrLn ""
|
||||||
mp <- S.gets $ view masterPass
|
mp <- S.gets $ view masterPass
|
||||||
lift $ putStrLn $ case pwGenerate mp d of
|
lift $ putStrLn $ case pwGenerate mp d of
|
||||||
Nothing -> "The password data were not valid."
|
Nothing -> "The password data were not valid."
|
||||||
Just pw -> "password for " ++ x ++ ": " ++ pw
|
Just pw -> "password for " ++ x ++ ": " ++ pw
|
||||||
|
|
||||||
|
showAltPass :: String -> S.StateT Status IO ()
|
||||||
|
showAltPass srv = do
|
||||||
|
lift $ putStrLn ""
|
||||||
|
old <- S.gets $ view masterPass
|
||||||
|
Just new <- lift $ runRequest $ required $ prompt "alternate master password: " reqPassword
|
||||||
|
S.modify $ masterPass .~ new
|
||||||
|
showPass srv
|
||||||
|
S.modify $ masterPass .~ old
|
||||||
|
servMenu srv
|
||||||
|
|
||||||
-- TODO: refactor this monstrosity
|
-- TODO: refactor this monstrosity
|
||||||
editPolicy :: PWPolicy -> Request PWPolicy
|
editPolicy :: PWPolicy -> Request PWPolicy
|
||||||
editPolicy policy = do
|
editPolicy policy = do
|
||||||
|
|||||||
11
package.yaml
11
package.yaml
@@ -1,10 +1,11 @@
|
|||||||
name: passman
|
name: passman
|
||||||
version: 0.3.0.2
|
version: 0.3.1
|
||||||
github: "jlamothe/passman"
|
license: LGPL-3.0-or-later
|
||||||
license: LGPL-3
|
|
||||||
author: "Jonathan Lamothe"
|
author: "Jonathan Lamothe"
|
||||||
maintainer: "jonathan@jlamothe.net"
|
maintainer: "jonathan@jlamothe.net"
|
||||||
copyright: "(C) 2018-2021 Jonathan Lamothe"
|
copyright: "(C) 2018-2021 Jonathan Lamothe"
|
||||||
|
homepage: https://codeberg.org/jlamothe/passman
|
||||||
|
bug-reports: https://codeberg.org/jlamothe/passman/issues
|
||||||
|
|
||||||
extra-source-files:
|
extra-source-files:
|
||||||
- README.md
|
- README.md
|
||||||
@@ -17,7 +18,7 @@ category: Security
|
|||||||
# To avoid duplicated efforts in documentation and dealing with the
|
# To avoid duplicated efforts in documentation and dealing with the
|
||||||
# complications of embedding Haddock markup inside cabal files, it is
|
# complications of embedding Haddock markup inside cabal files, it is
|
||||||
# common to point users to the README.md file.
|
# common to point users to the README.md file.
|
||||||
description: Please see the README on GitHub at <https://github.com/jlamothe/passman#readme>
|
description: a simple password manager - see README.md for details
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- base >= 4.7 && < 5
|
- base >= 4.7 && < 5
|
||||||
@@ -51,7 +52,7 @@ executables:
|
|||||||
- passman
|
- passman
|
||||||
- easy-file >= 0.2.2 && < 0.3
|
- easy-file >= 0.2.2 && < 0.3
|
||||||
- HCL >= 1.8 && < 1.9
|
- HCL >= 1.8 && < 1.9
|
||||||
- transformers >= 0.5.6.2
|
- transformers >= 0.5.6.2 && < 0.6
|
||||||
|
|
||||||
tests:
|
tests:
|
||||||
passman-test:
|
passman-test:
|
||||||
|
|||||||
@@ -1,32 +1,28 @@
|
|||||||
cabal-version: 1.12
|
cabal-version: 2.2
|
||||||
|
|
||||||
-- This file has been generated from package.yaml by hpack version 0.33.0.
|
-- This file has been generated from package.yaml by hpack version 0.34.4.
|
||||||
--
|
--
|
||||||
-- see: https://github.com/sol/hpack
|
-- see: https://github.com/sol/hpack
|
||||||
--
|
--
|
||||||
-- hash: 2f7f0e04b3c25e738c5538d07d22d64c28c2a586ed82d577999d070ceafc41ba
|
-- hash: 28f118d81a1b3ac7f27513c569620a2eab195e5abd718c66c5a9d5529ec0268a
|
||||||
|
|
||||||
name: passman
|
name: passman
|
||||||
version: 0.3.0.2
|
version: 0.3.1
|
||||||
synopsis: a simple password manager
|
synopsis: a simple password manager
|
||||||
description: Please see the README on GitHub at <https://github.com/jlamothe/passman#readme>
|
description: a simple password manager - see README.md for details
|
||||||
category: Security
|
category: Security
|
||||||
homepage: https://github.com/jlamothe/passman#readme
|
homepage: https://codeberg.org/jlamothe/passman
|
||||||
bug-reports: https://github.com/jlamothe/passman/issues
|
bug-reports: https://codeberg.org/jlamothe/passman/issues
|
||||||
author: Jonathan Lamothe
|
author: Jonathan Lamothe
|
||||||
maintainer: jonathan@jlamothe.net
|
maintainer: jonathan@jlamothe.net
|
||||||
copyright: (C) 2018-2021 Jonathan Lamothe
|
copyright: (C) 2018-2021 Jonathan Lamothe
|
||||||
license: LGPL-3
|
license: LGPL-3.0-or-later
|
||||||
license-file: LICENSE
|
license-file: LICENSE
|
||||||
build-type: Simple
|
build-type: Simple
|
||||||
extra-source-files:
|
extra-source-files:
|
||||||
README.md
|
README.md
|
||||||
ChangeLog.md
|
ChangeLog.md
|
||||||
|
|
||||||
source-repository head
|
|
||||||
type: git
|
|
||||||
location: https://github.com/jlamothe/passman
|
|
||||||
|
|
||||||
library
|
library
|
||||||
exposed-modules:
|
exposed-modules:
|
||||||
Password
|
Password
|
||||||
@@ -45,7 +41,7 @@ library
|
|||||||
, containers >=0.6.2.1 && <0.7
|
, containers >=0.6.2.1 && <0.7
|
||||||
, microlens >=0.4.11.2 && <0.5
|
, microlens >=0.4.11.2 && <0.5
|
||||||
, microlens-th >=0.4.3.6 && <0.5
|
, microlens-th >=0.4.3.6 && <0.5
|
||||||
, random >=1.1 && <1.2
|
, random ==1.1.*
|
||||||
, text >=1.2.4.1 && <1.3
|
, text >=1.2.4.1 && <1.3
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
|
|
||||||
@@ -60,7 +56,7 @@ executable passman
|
|||||||
app
|
app
|
||||||
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N
|
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N
|
||||||
build-depends:
|
build-depends:
|
||||||
HCL >=1.8 && <1.9
|
HCL ==1.8.*
|
||||||
, aeson >=1.5.6.0 && <1.6
|
, aeson >=1.5.6.0 && <1.6
|
||||||
, base >=4.7 && <5
|
, base >=4.7 && <5
|
||||||
, bytestring >=0.10.12.0 && <0.11
|
, bytestring >=0.10.12.0 && <0.11
|
||||||
@@ -69,8 +65,8 @@ executable passman
|
|||||||
, microlens >=0.4.11.2 && <0.5
|
, microlens >=0.4.11.2 && <0.5
|
||||||
, microlens-th >=0.4.3.6 && <0.5
|
, microlens-th >=0.4.3.6 && <0.5
|
||||||
, passman
|
, passman
|
||||||
, random >=1.1 && <1.2
|
, random ==1.1.*
|
||||||
, transformers >=0.5.6.2
|
, transformers >=0.5.6.2 && <0.6
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
|
|
||||||
test-suite passman-test
|
test-suite passman-test
|
||||||
@@ -104,5 +100,5 @@ test-suite passman-test
|
|||||||
, microlens >=0.4.11.2 && <0.5
|
, microlens >=0.4.11.2 && <0.5
|
||||||
, microlens-th >=0.4.3.6 && <0.5
|
, microlens-th >=0.4.3.6 && <0.5
|
||||||
, passman
|
, passman
|
||||||
, random >=1.1 && <1.2
|
, random ==1.1.*
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
|
|||||||
Reference in New Issue
Block a user