Class UsernamePasswordCredentialsImpl
java.lang.Object
com.cloudbees.plugins.credentials.BaseCredentials
com.cloudbees.plugins.credentials.impl.BaseStandardCredentials
com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl
- All Implemented Interfaces:
IdCredentials
,PasswordCredentials
,StandardCredentials
,StandardUsernameCredentials
,StandardUsernamePasswordCredentials
,UsernameCredentials
,UsernamePasswordCredentials
,Credentials
,ExtensionPoint
,Describable<Credentials>
,Serializable
public class UsernamePasswordCredentialsImpl
extends BaseStandardCredentials
implements StandardUsernamePasswordCredentials
Concrete implementation of
StandardUsernamePasswordCredentials
.- Since:
- 1.6
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Descriptor to use for subclasses ofBaseStandardCredentials
.Nested classes/interfaces inherited from class com.cloudbees.plugins.credentials.impl.BaseStandardCredentials
BaseStandardCredentials.BaseStandardCredentialsDescriptor
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
Nested classes/interfaces inherited from interface com.cloudbees.plugins.credentials.common.IdCredentials
IdCredentials.Helpers
Nested classes/interfaces inherited from interface com.cloudbees.plugins.credentials.common.StandardCredentials
StandardCredentials.NameProvider
Nested classes/interfaces inherited from interface com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials
StandardUsernamePasswordCredentials.NameProvider
-
Constructor Summary
ConstructorsConstructorDescriptionUsernamePasswordCredentialsImpl
(CredentialsScope scope, String id, String description, String username, String password) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the Password.Returns the username.boolean
WhetherUsernameCredentials.getUsername()
should be considered a secret for purposes of behaviors like masking in build logs.void
setUsernameSecret
(boolean usernameSecret) Methods inherited from class com.cloudbees.plugins.credentials.impl.BaseStandardCredentials
equals, getDescription, getId, hashCode
Methods inherited from class com.cloudbees.plugins.credentials.BaseCredentials
getDescriptor, getScope
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.cloudbees.plugins.credentials.Credentials
forRun, getDescriptor, getScope
Methods inherited from interface com.cloudbees.plugins.credentials.common.IdCredentials
getId
Methods inherited from interface com.cloudbees.plugins.credentials.common.StandardCredentials
getDescription
-
Constructor Details
-
UsernamePasswordCredentialsImpl
@DataBoundConstructor public UsernamePasswordCredentialsImpl(@CheckForNull CredentialsScope scope, @CheckForNull String id, @CheckForNull String description, @CheckForNull String username, @CheckForNull String password) throws Descriptor.FormException Constructor.- Parameters:
scope
- the credentials scopeid
- the ID ornull
to generate a new one.description
- the description.username
- the username.password
- the password.- Throws:
Descriptor.FormException
-
-
Method Details
-
getPassword
Returns the Password.- Specified by:
getPassword
in interfacePasswordCredentials
- Returns:
- the password.
-
getUsername
Returns the username.- Specified by:
getUsername
in interfaceUsernameCredentials
- Returns:
- the username.
-
isUsernameSecret
public boolean isUsernameSecret()Description copied from interface:UsernameCredentials
WhetherUsernameCredentials.getUsername()
should be considered a secret for purposes of behaviors like masking in build logs.- Specified by:
isUsernameSecret
in interfaceUsernameCredentials
- Returns:
- true by default
-
setUsernameSecret
@DataBoundSetter public void setUsernameSecret(boolean usernameSecret)
-