Class SauceCredentials
java.lang.Object
com.cloudbees.plugins.credentials.BaseCredentials
com.cloudbees.plugins.credentials.impl.BaseStandardCredentials
hudson.plugins.sauce_ondemand.credentials.SauceCredentials
- All Implemented Interfaces:
com.cloudbees.plugins.credentials.common.IdCredentials,com.cloudbees.plugins.credentials.common.PasswordCredentials,com.cloudbees.plugins.credentials.common.StandardCredentials,com.cloudbees.plugins.credentials.common.StandardUsernameCredentials,com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials,com.cloudbees.plugins.credentials.common.UsernameCredentials,com.cloudbees.plugins.credentials.common.UsernamePasswordCredentials,com.cloudbees.plugins.credentials.Credentials,ExtensionPoint,Describable<com.cloudbees.plugins.credentials.Credentials>,Serializable
public class SauceCredentials
extends com.cloudbees.plugins.credentials.impl.BaseStandardCredentials
implements com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic final classNested classes/interfaces inherited from class com.cloudbees.plugins.credentials.impl.BaseStandardCredentials
com.cloudbees.plugins.credentials.impl.BaseStandardCredentials.BaseStandardCredentialsDescriptorNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudsonNested classes/interfaces inherited from interface com.cloudbees.plugins.credentials.common.IdCredentials
com.cloudbees.plugins.credentials.common.IdCredentials.HelpersNested classes/interfaces inherited from interface com.cloudbees.plugins.credentials.common.StandardCredentials
com.cloudbees.plugins.credentials.common.StandardCredentials.NameProviderNested classes/interfaces inherited from interface com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials
com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials.NameProvider -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final SecretThe Password/apikeystatic final com.cloudbees.plugins.credentials.domains.DomainRequirementprotected final StringThe data center endpointprotected SauceCredentials.ShortLivedConfigprotected final StringThe username. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<SauceCredentials>static List<SauceCredentials>Deprecated.static ListBoxModelfillCredentialsIdItems(Item item, String currentValue) Fills a credentials dropdown with the Sauce credentials the current user is allowed to see, following the credentials plugin consumer guide (SECURITY-3770): outside of an item (global configuration) only administrators get the list, looked up against the Jenkins root; inside an item only users withItem.EXTENDED_READ(implied byItem.CONFIGURE) orCredentialsProvider.USE_ITEMget the list, looked up in the item's context with the authentication the item's builds run as, which excludesSYSTEM-scoped credentials; everybody else only gets the currently selected value, so the form still round-trips. Build-time lookups must keep usinggetCredentialsById(Item, String).static SauceCredentialsgetCredentials(AbstractBuild build) static SauceCredentialsgetCredentials(AbstractProject project) static SauceCredentialsgetCredentialsById(Item context, String id) Creates a HMAC token which is used as part of the Javascript inclusion that embeds the Sauce resultsstatic SauceCredentialsgetSauceCredentials(AbstractBuild build, SauceOnDemandBuildWrapper wrapper) getSauceREST(ProxyConfiguration proxy) static StringmigrateToCredentials(String username, String accessKey, String restEndpoint, String migratedFrom) voidsetShortLivedConfig(SauceCredentials.ShortLivedConfig shortLivedConfig) toString()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, 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
getDescriptionMethods inherited from interface com.cloudbees.plugins.credentials.common.UsernameCredentials
isUsernameSecret
-
Field Details
-
username
The username. -
apiKey
The Password/apikey -
restEndpoint
The data center endpoint -
shortLivedConfig
-
DOMAIN_REQUIREMENT
public static final com.cloudbees.plugins.credentials.domains.DomainRequirement DOMAIN_REQUIREMENT
-
-
Constructor Details
-
SauceCredentials
-
-
Method Details
-
getShortLivedConfig
-
setShortLivedConfig
@DataBoundSetter public void setShortLivedConfig(SauceCredentials.ShortLivedConfig shortLivedConfig) -
getCredentials
-
getCredentials
-
getPassword
- Specified by:
getPasswordin interfacecom.cloudbees.plugins.credentials.common.PasswordCredentials
-
getApiKey
-
getRestEndpoint
-
getRestEndpointName
-
getRegion
-
getUsername
- Specified by:
getUsernamein interfacecom.cloudbees.plugins.credentials.common.UsernameCredentials
-
toString
-
getSauceCredentials
public static SauceCredentials getSauceCredentials(AbstractBuild build, SauceOnDemandBuildWrapper wrapper) -
getSauceREST
-
migrateToCredentials
public static String migrateToCredentials(String username, String accessKey, String restEndpoint, String migratedFrom) throws InterruptedException, IOException - Throws:
InterruptedExceptionIOException
-
all
Deprecated.no longer used by the plugin; UI code must usefillCredentialsIdItems(Item, String)so that the caller's permissions are honoured. -
all
-
fillCredentialsIdItems
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static ListBoxModel fillCredentialsIdItems(@CheckForNull Item item, @CheckForNull String currentValue) Fills a credentials dropdown with the Sauce credentials the current user is allowed to see, following the credentials plugin consumer guide (SECURITY-3770):- outside of an item (global configuration) only administrators get the list, looked up against the Jenkins root;
- inside an item only users with
Item.EXTENDED_READ(implied byItem.CONFIGURE) orCredentialsProvider.USE_ITEMget the list, looked up in the item's context with the authentication the item's builds run as, which excludesSYSTEM-scoped credentials; - everybody else only gets the currently selected value, so the form still round-trips.
getCredentialsById(Item, String).- Parameters:
item- the ancestor item, ornullfor the global configurationcurrentValue- the currently selected credentials id, may benull- Returns:
- the model for the dropdown
-
getCredentialsById
-
getHMAC
Creates a HMAC token which is used as part of the Javascript inclusion that embeds the Sauce results- Parameters:
jobId- the Sauce job id- Returns:
- the HMAC token
-
fillCredentialsIdItems(Item, String)so that the caller's permissions are honoured.