@groovy.transform.CompileStatic class Credential extends java.lang.Object
This class represents a credential of CloudBees CD. In ElectricFlow credentials are special secured containers for secret values.
Type | Name and description |
---|---|
java.lang.String |
credentialName Name of the credential parameter |
java.lang.String |
credentialType Type of the credential. |
java.lang.String |
secretValue Secret part of the credential |
java.lang.String |
userName UserName part of the credential |
Constructor and description |
---|
Credential
(java.lang.String userName, java.lang.String secretValue, java.lang.String credentialType = 'credential', java.lang.String credentialName = 'credential') Constructor |
Type Params | Return Type | Name and description |
---|---|---|
|
java.lang.String |
getCredentialName() Returns name of the current credential |
|
java.lang.String |
getCredentialType() Returns type of the current credential |
|
java.lang.String |
getName() The generic method allowing the credential can be processed as a parameter. |
|
java.lang.String |
getSecretValue() Returns a secret value that is stored in the current credential. |
|
java.lang.String |
getUserName() Returns a user name that is stored in the current credential. |
|
java.lang.String |
getValue() The generic method allowing the credential can be processed as a parameter. |
|
void |
setCredentialName(java.lang.String credentialName) Sets new name for a current credential. |
|
void |
setCredentialType(java.lang.String credentialType) Sets new type of the credential |
|
void |
setSecretValue(java.lang.String secretValue) Sets new secret value |
|
void |
setUserName(java.lang.String userName) Sets new value for a username. |
|
java.lang.String |
toString() Credentials should not be shown in a string context for security reasons. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Name of the credential parameter
Type of the credential. Possible values 'credential', 'secret'
Secret part of the credential
UserName part of the credential
Constructor
Returns name of the current credential
Returns type of the current credential
The generic method allowing the credential can be processed as a parameter.
Returns a secret value that is stored in the current credential.
Returns a user name that is stored in the current credential.
The generic method allowing the credential can be processed as a parameter. Giving just something that allows to identify the username, not the secret
Sets new name for a current credential.
credentialName
- new name for a current credentialSets new type of the credential
credentialType
- type of the credentialSets new secret value
secretValue
- secret value that is stored in the current credential.Sets new value for a username.
userName
- a string that is stored as an username in credentialCredentials should not be shown in a string context for security reasons.
Groovy Documentation