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 ofStandardUsernamePasswordCredentials
.- Since:
- 1.6
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UsernamePasswordCredentialsImpl.DescriptorImpl
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
Constructors Constructor Description UsernamePasswordCredentialsImpl(CredentialsScope scope, String id, String description, String username, String password)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Secret
getPassword()
Returns the Password.String
getUsername()
Returns the username.boolean
isUsernameSecret()
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 Detail
-
UsernamePasswordCredentialsImpl
@DataBoundConstructor public UsernamePasswordCredentialsImpl(@CheckForNull CredentialsScope scope, @CheckForNull String id, @CheckForNull String description, @CheckForNull String username, @CheckForNull String password)
Constructor.- Parameters:
scope
- the credentials scopeid
- the ID ornull
to generate a new one.description
- the description.username
- the username.password
- the password.
-
-
Method Detail
-
getPassword
@NonNull public Secret getPassword()
Returns the Password.- Specified by:
getPassword
in interfacePasswordCredentials
- Returns:
- the password.
-
getUsername
@NonNull public String 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)
-
-