Class UserCredentialsProvider
java.lang.Object
hudson.model.Descriptor<CredentialsProvider>
com.cloudbees.plugins.credentials.CredentialsProvider
com.cloudbees.plugins.credentials.UserCredentialsProvider
- All Implemented Interfaces:
ExtensionPoint,Describable<CredentialsProvider>,Saveable,Loadable,OnMaster,IconSpec
A store of credentials tied to a specific
User.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classOur implementationstatic classNeed a user property to hold the user's personal credentials.static classNested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.SelfNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class com.cloudbees.plugins.credentials.CredentialsProvider
CREATE, DELETE, GROUP, MANAGE_DOMAINS, NONE, UPDATE, USE_ITEM, USE_OWN, VIEWFields inherited from class hudson.model.Descriptor
clazz -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<C extends Credentials>
List<C> getCredentialsInItemGroup(Class<C> type, ItemGroup itemGroup, org.springframework.security.core.Authentication authentication, List<DomainRequirement> domainRequirements) Returns the credentials provided by this provider which are available to the specifiedAuthenticationfor items in the specifiedItemGroupand are appropriate for the specifieds.invalid reference
.plugins.credentials.domains.DomainRequirementgetScopes(ModelObject object) Returns the scopes allowed for credentials stored within the specified object ornullif the object is not relevant for scopes and the object's container should be considered instead.getStore(ModelObject object) Returns theCredentialsStorethat thisCredentialsProvidermaintains specifically for thisModelObjectornullif either the object is not a credentials container or thisCredentialsProviderdoes not maintain a store specifically bound to thisModelObject.Methods inherited from class com.cloudbees.plugins.credentials.CredentialsProvider
_isApplicable, all, allCredentialsDescriptors, enabled, enabled, findCredentialById, findCredentialById, findCredentialById, findCredentialByIdInItem, findCredentialByIdInItemGroup, getCredentialByIdInItem, getCredentialByIdInItemGroup, getCredentialIds, getCredentialIds, getCredentialIdsInItem, getCredentialIdsInItemGroup, getCredentials, getCredentials, getCredentials, getCredentials, getCredentialsDescriptors, getCredentialsInItem, getDescriptor, getDisplayName, getFingerprintOf, getOrCreateFingerprintOf, hasCredentialsDescriptors, hasStores, isApplicable, isApplicable, isEnabled, isEnabled, listCredentials, listCredentials, listCredentialsInItem, listCredentialsInItemGroup, lookupCredentials, lookupCredentials, lookupCredentials, lookupCredentials, lookupCredentials, lookupCredentials, lookupCredentials, lookupCredentials, lookupCredentials, lookupCredentials, lookupCredentialsInItem, lookupCredentialsInItem, lookupCredentialsInItemGroup, lookupCredentialsInItemGroup, lookupScopes, lookupStores, saveAll, snapshot, snapshot, track, track, track, trackAll, trackAll, trackAll, trackAll, trackAll, trackAllMethods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, configure, configure, doHelp, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getStaticHelpUrl, getStaticHelpUrl, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
Constructor Details
-
UserCredentialsProvider
public UserCredentialsProvider()
-
-
Method Details
-
getScopes
Returns the scopes allowed for credentials stored within the specified object ornullif the object is not relevant for scopes and the object's container should be considered instead.- Overrides:
getScopesin classCredentialsProvider- Parameters:
object- the object.- Returns:
- the set of scopes that are relevant for the object or
nullif the object is not a credentials container.
-
getStore
Returns theCredentialsStorethat thisCredentialsProvidermaintains specifically for thisModelObjectornullif either the object is not a credentials container or thisCredentialsProviderdoes not maintain a store specifically bound to thisModelObject.- Overrides:
getStorein classCredentialsProvider- Parameters:
object- theItemorItemGrouporUserthat the store is being requested of.- Returns:
- either
nullor a scopedCredentialsStorewhereCredentialsStore.getContext()== object.
-
getCredentialsInItemGroup
@NonNull public <C extends Credentials> List<C> getCredentialsInItemGroup(@NonNull Class<C> type, @Nullable ItemGroup itemGroup, @Nullable org.springframework.security.core.Authentication authentication, @NonNull List<DomainRequirement> domainRequirements) Returns the credentials provided by this provider which are available to the specifiedAuthenticationfor items in the specifiedItemGroupand are appropriate for the specifieds.invalid reference
.plugins.credentials.domains.DomainRequirement- Overrides:
getCredentialsInItemGroupin classCredentialsProvider- Type Parameters:
C- the credentials type.- Parameters:
type- the type of credentials to return.itemGroup- the item group (ifnullassumeJenkins.get().authentication- the authentication (ifnullassumeACL.SYSTEM2.domainRequirements- the credential domains to match (if theCredentialsProviderdoes not supportDomainRequirements then it should assume the match is true).- Returns:
- the list of credentials.
-
getIconClassName
- Specified by:
getIconClassNamein interfaceIconSpec- Overrides:
getIconClassNamein classCredentialsProvider
-