@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public class UserSSHKeyManager extends Object
| Constructor and Description |
|---|
UserSSHKeyManager() |
| Modifier and Type | Method and Description |
|---|---|
static com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey |
getOrCreate(User user)
Gets the existing generated SSH key for the user or creates one and
returns it in the user's credential store
|
static UserKey |
getPublicKey(User user,
com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey key)
Gets a readable SSH-compatible public key a user could paste somewhere
|
static void |
reset(User user)
Resets the user's generated key by deleting it and creating a new one
|
@Nonnull public static com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey getOrCreate(@Nonnull User user)
user - owner of the key@Nonnull public static UserKey getPublicKey(@Nonnull User user, @Nonnull com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey key)
user - the user which will be used to build a useful descriptionkey - the private key to useCopyright © 2016–2018. All rights reserved.