Class SauceCredentials.DescriptorImpl
java.lang.Object
hudson.model.Descriptor<com.cloudbees.plugins.credentials.Credentials>
com.cloudbees.plugins.credentials.CredentialsDescriptor
hudson.plugins.sauce_ondemand.credentials.SauceCredentials.DescriptorImpl
- Enclosing class:
- SauceCredentials
@Extension
public static class SauceCredentials.DescriptorImpl
extends com.cloudbees.plugins.credentials.CredentialsDescriptor
-
Nested Class Summary
Nested classes/interfaces inherited from class com.cloudbees.plugins.credentials.CredentialsDescriptor
com.cloudbees.plugins.credentials.CredentialsDescriptor.EnhancedCheckMethodNested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self -
Field Summary
Fields inherited from class hudson.model.Descriptor
clazz -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoCheckApiKey(Item item, String value, String username, String dataCenter) Validates a Sauce Labs username / access key pair against the Sauce Labs accounts API.Methods inherited from class com.cloudbees.plugins.credentials.CredentialsDescriptor
calcAutoCompleteSettings, calcFillSettings, doFillScopeItems, findContextInPath, findContextInPath, getCheckMethod, getCredentialsPage, isApplicable, isScopeRelevant, isScopeRelevant, isScopeRelevant, isScopeRelevant, isScopeRelevant, isScopeRelevant, lookupContext, unwrapContextMethods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, configure, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getStaticHelpUrl, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
Constructor Details
-
DescriptorImpl
public DescriptorImpl()
-
-
Method Details
-
getDisplayName
- Overrides:
getDisplayNamein classDescriptor<com.cloudbees.plugins.credentials.Credentials>
-
doCheckApiKey
@POST public FormValidation doCheckApiKey(@AncestorInPath Item item, @QueryParameter String value, @QueryParameter String username, @QueryParameter String dataCenter) Validates a Sauce Labs username / access key pair against the Sauce Labs accounts API.Only administrators (system credentials store) or users allowed to configure the ancestor item (folder store, or the inline "Add credentials" dialog of a job) may trigger the outbound request. Everybody else silently gets
FormValidation.ok(), so the endpoint cannot be used as a credentials oracle. Restricted to POST so it cannot be triggered by following a link (SECURITY-3770).- Parameters:
item- the ancestor item, ornullfor the system / user credentials storesvalue- the access key to validateusername- the Sauce Labs usernamedataCenter- the Sauce Labs data center name, defaults toUS_WEST- Returns:
- the validation result
-
getIconClassName
- Specified by:
getIconClassNamein interfaceIconSpec- Overrides:
getIconClassNamein classcom.cloudbees.plugins.credentials.CredentialsDescriptor
-