@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(hudson.model.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(hudson.model.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(hudson.model.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 hudson.model.User user)
user - owner of the key@Nonnull public static UserKey getPublicKey(@Nonnull hudson.model.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 usepublic static void reset(@Nonnull hudson.model.User user)
user - user to reset a key forCopyright © 2016–2017. All rights reserved.