File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ import Data.Functor.Identity (Identity (..))
15
15
import Facts (FactsSelection , factsCmd )
16
16
import GitHub (Auth )
17
17
import Lib.JSON.Canonical.Extra
18
- import Lib.SSH.Private (SSHClient , WithSelector (.. ))
18
+ import Lib.SSH.Private (SSHClient , WithSelector (.. ), sshKeySelectors )
19
19
import MPFS.API
20
20
( MPFS (.. )
21
21
, mpfsClient
@@ -70,6 +70,7 @@ data Command a where
70
70
-> TokenId
71
71
-> Command
72
72
(AValidationResult TokenInfoFailure (Token WithValidation ))
73
+ SSHSelectors :: SSHClient 'WithoutSelector -> Command [String ]
73
74
74
75
data SetupError = TokenNotSpecified
75
76
deriving (Show , Eq )
@@ -152,6 +153,7 @@ cmd = \case
152
153
$ validateRequest oracle mconfig validation req
153
154
pure $ WithValidation r req
154
155
lift $ fmapMToken f token
156
+ SSHSelectors sshClient -> sshKeySelectors sshClient
155
157
156
158
newtype TokenInfoFailure = TokenInfoTokenNotParsable TokenId
157
159
deriving (Show , Eq )
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ import User.Agent.Types (TestRunId)
55
55
import User.Requester.Options
56
56
( requesterCommandParser
57
57
, sshClientOption
58
+ , sshClientOptionWithoutSelector
58
59
)
59
60
import Wallet.Options (walletCommandParser )
60
61
@@ -106,6 +107,8 @@ commandParser =
106
107
<$> githubAuthOption
107
108
<*> mpfsClientOption
108
109
<*> tokenIdOption
110
+ , command " ssh-selectors" " List key selectors for an SSH key file"
111
+ $ Box . SSHSelectors <$> sshClientOptionWithoutSelector
109
112
]
110
113
111
114
factsSelectionParser :: Parser (Box FactsSelection )
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ module User.Requester.Options
5
5
, addPublicKeyOptions
6
6
, addRoleOptions
7
7
, sshClientOption
8
+ , sshClientOptionWithoutSelector
8
9
) where
9
10
10
11
import Core.Options
@@ -130,6 +131,13 @@ sshClientOption =
130
131
<*> keyFileOption
131
132
<*> keyPasswordOption
132
133
134
+ sshClientOptionWithoutSelector
135
+ :: Parser (SSHClient 'WithoutSelector)
136
+ sshClientOptionWithoutSelector =
137
+ SSHClient ()
138
+ <$> keyFileOption
139
+ <*> keyPasswordOption
140
+
133
141
keySelectorOption :: Parser String
134
142
keySelectorOption =
135
143
setting
You can’t perform that action at this time.
0 commit comments