Skip to content

Commit

Permalink
fixup! Add passphrase input to the add SSH key dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
vinokurig authored and ibuziuk committed Sep 16, 2024
1 parent aff295c commit e35bccb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ describe('Helpers for SSH Keys API', () => {
'dwo_ssh_key.pub': token.keyPub,
dwo_ssh_key: token.key,
ssh_config: btoa(SSH_CONFIG),
passphrase: 'passphrase',
passphrase: btoa('passphrase'),
},
kind: 'Secret',
metadata: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export function toSecret(namespace: string, sshKey: api.NewSshKey): SshKeySecret
'dwo_ssh_key.pub': sshKey.keyPub,
dwo_ssh_key: sshKey.key,
ssh_config: btoa(SSH_CONFIG),
...(sshKey.passphrase && { passphrase: sshKey.passphrase }),
...(sshKey.passphrase && { passphrase: btoa(sshKey.passphrase) }),
},
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ exports[`SshPassphrase snapshot 1`] = `
onFocus={[Function]}
placeholder="Enter passphrase (optional)"
required={false}
type="text"
type="password"
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export class SshPassphrase extends React.Component<Props, State> {
aria-label="Passphrase"
placeholder="Enter passphrase (optional)"
onChange={passphrase => this.onChange(passphrase)}
type="password"
/>
</FormGroup>
);
Expand Down

0 comments on commit e35bccb

Please sign in to comment.