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 classUser name and password credential, implementation.Nested classes/interfaces inherited from class com.cloudbees.plugins.credentials.impl.BaseStandardCredentials
BaseStandardCredentials.BaseStandardCredentialsDescriptorNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudsonNested classes/interfaces inherited from interface com.cloudbees.plugins.credentials.common.IdCredentials
IdCredentials.HelpersNested classes/interfaces inherited from interface com.cloudbees.plugins.credentials.common.StandardCredentials
StandardCredentials.NameProviderNested 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.booleanWhetherUsernameCredentials.getUsername()should be considered a secret for purposes of behaviors like masking in build logs.voidsetUsernameSecret(boolean usernameSecret) Methods inherited from class com.cloudbees.plugins.credentials.impl.BaseStandardCredentials
equals, getDescription, getId, hashCodeMethods inherited from class com.cloudbees.plugins.credentials.BaseCredentials
getDescriptor, getScopeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.cloudbees.plugins.credentials.Credentials
forRun, getDescriptor, getScopeMethods inherited from interface com.cloudbees.plugins.credentials.common.IdCredentials
getIdMethods 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 ornullto generate a new one.description- the description.username- the username.password- the password.- Throws:
Descriptor.FormException
-
-
Method Details
-
getPassword
Returns the Password.- Specified by:
getPasswordin interfacePasswordCredentials- Returns:
- the password.
-
getUsername
Returns the username.- Specified by:
getUsernamein interfaceUsernameCredentials- Returns:
- the username.
-
isUsernameSecret
public boolean isUsernameSecret()Description copied from interface:UsernameCredentialsWhetherUsernameCredentials.getUsername()should be considered a secret for purposes of behaviors like masking in build logs.- Specified by:
isUsernameSecretin interfaceUsernameCredentials- Returns:
- true by default
-
setUsernameSecret
@DataBoundSetter public void setUsernameSecret(boolean usernameSecret)
-