Class CredentialsAuth
java.lang.Object
hudson.model.AbstractDescribableImpl<Auth2>
io.jenkins.plugins.remote.result.trigger.auth2.Auth2
io.jenkins.plugins.remote.result.trigger.auth2.CredentialsAuth
- All Implemented Interfaces:
- Describable<Auth2>,- Serializable,- Cloneable
- Author:
- HW
- See Also:
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class io.jenkins.plugins.remote.result.trigger.auth2.Auth2Auth2.Auth2Descriptor
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleangetCredentials(Item item) Get JenkinsClient CredentialsgetPassword(Item item) Tries to find the Jenkins Credential and returns the password.getUserName(Item item) Tries to find the Jenkins Credential and returns the user name.inthashCode()voidsetCredentialsId(String credentialsId) toString()Returns a string representing the authorization.
- 
Field Details- 
DESCRIPTOR
 
- 
- 
Constructor Details- 
CredentialsAuth@DataBoundConstructor public CredentialsAuth()
 
- 
- 
Method Details- 
setCredentialsId
- 
getCredentialsId
- 
getUserNameTries to find the Jenkins Credential and returns the user name.- Parameters:
- item- the Item (Job, Pipeline,...) we are currently running in. The item is required to also get Credentials which are defined in the items scope and not Jenkins globally. Value can be null, but Credentials e.g. configured on a Folder will not be found in this case, only globally configured Credentials.
- Returns:
- The user name configured in this Credential
- Throws:
- CredentialsNotFoundException- if credential could not be found.
 
- 
getPasswordTries to find the Jenkins Credential and returns the password.- Parameters:
- item- the Item (Job, Pipeline,...) we are currently running in. The item is required to also get Credentials which are defined in the items scope and not Jenkins globally. Value can be null, but Credentials e.g. configured on a Folder will not be found in this case, only globally configured Credentials.
- Returns:
- The password configured in this Credential
- Throws:
- CredentialsNotFoundException- if credential could not be found.
 
- 
getCredentialsGet JenkinsClient Credentials- Specified by:
- getCredentialsin class- Auth2
- Parameters:
- item- item
- Returns:
- Credentials
- Throws:
- CredentialsNotFoundException
 
- 
toString
- 
toStringDescription copied from class:Auth2Returns a string representing the authorization.- Specified by:
- toStringin class- Auth2
- Parameters:
- item- the Item (Job, Pipeline,...) we are currently running in. The item is required to also get Credentials which are defined in the items scope and not Jenkins globally. Value can be null, but Credentials e.g. configured on a Folder will not be found in this case, only globally configured Credentials.
- Returns:
- a string representing the authorization.
 
- 
getDescriptor- Specified by:
- getDescriptorin interface- Describable<Auth2>
- Overrides:
- getDescriptorin class- AbstractDescribableImpl<Auth2>
 
- 
hashCodepublic int hashCode()
- 
equals
 
-