PlagueHO / jenkins

PowerShell module for interacting with a CloudBees Jenkins server using the Jenkins Rest API.
MIT License
11 stars 28 forks source link

Add Function to Create API Token #8

Open PlagueHO opened 4 years ago

PlagueHO commented 4 years ago

As of more recent versions of Jenkins, an API token is required to log in to the REST APIs, rather than username/password.

Create a new function to generate an API Token: http://localhost/me/descriptorByName/jenkins.security.ApiTokenProperty/generateNewToken

Post: newTokenName=NameOfToken

Pass user credential and crumb

HaxtonFale commented 1 year ago

Should this also include a matching method to revoke a token?