Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import hudson.model.User;
- import jenkins.security.ApiTokenProperty;
- import hudson.util.Secret;
- // Get the actual token
- u = User.get("admin")
- tokprop = u.getProperty(ApiTokenProperty.class)
- actual_token = tokprop.getApiTokenInsecure()
Add Comment
Please, Sign In to add comment