|
@ -163,6 +163,11 @@ public class Vault implements VaultInterface { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void listCredentials() { |
|
|
|
|
|
for (Credential credential : credentialRepository.getCredentialList()) { |
|
|
|
|
|
println(String.format("ID: %d - Username: %s", credential.getId(), credential.getName())); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public void getAsJson(){ |
|
|
public void getAsJson(){ |
|
|
|
|
|
|
|
@ -215,6 +220,7 @@ public class Vault implements VaultInterface { |
|
|
sbcm.append("- add credential: a\n"); |
|
|
sbcm.append("- add credential: a\n"); |
|
|
sbcm.append("- show credential: c\n"); |
|
|
sbcm.append("- show credential: c\n"); |
|
|
sbcm.append("- edit credential: l\n"); |
|
|
sbcm.append("- edit credential: l\n"); |
|
|
|
|
|
sbcm.append("- list credentials: s\n"); |
|
|
sbcm.append("- exit: e\n"); |
|
|
sbcm.append("- exit: e\n"); |
|
|
|
|
|
|
|
|
println(sbcm.toString()); |
|
|
println(sbcm.toString()); |
|
@ -238,6 +244,10 @@ public class Vault implements VaultInterface { |
|
|
case "l": |
|
|
case "l": |
|
|
editCredential(); |
|
|
editCredential(); |
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
case "s": |
|
|
|
|
|
listCredentials(); |
|
|
|
|
|
break; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |