Package jenkins.security
Class QueueItemAuthenticator
java.lang.Object
hudson.model.AbstractDescribableImpl<QueueItemAuthenticator>
jenkins.security.QueueItemAuthenticator
- All Implemented Interfaces:
 ExtensionPoint,Describable<QueueItemAuthenticator>
public abstract class QueueItemAuthenticator
extends AbstractDescribableImpl<QueueItemAuthenticator>
implements ExtensionPoint
Extension point to run 
Queue.Executables under a specific identity for better access control.
 You must override either authenticate2(hudson.model.Queue.Item), or authenticate2(hudson.model.Queue.Task), or both.- Since:
 - 1.520
 - Author:
 - Kohsuke Kawaguchi
 - See Also:
 
- 
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionauthenticate(Queue.Item item) Deprecated.authenticate(Queue.Task task) Deprecated.org.springframework.security.core.Authenticationauthenticate2(Queue.Item item) Determines the identity in which theQueue.Executablewill run as.org.springframework.security.core.Authenticationauthenticate2(Queue.Task task) Determines the identity in which theQueue.Executablewill run as.By default looks for a nested class (conventionally namedDescriptorImpl) implementingDescriptorand marked withExtension. 
- 
Constructor Details
- 
QueueItemAuthenticator
public QueueItemAuthenticator() 
 - 
 - 
Method Details
- 
authenticate2
@CheckForNull public org.springframework.security.core.Authentication authenticate2(Queue.Item item) Determines the identity in which theQueue.Executablewill run as. The default implementation delegates toauthenticate2(hudson.model.Queue.Task).- Parameters:
 item- The contextual information to assist the authentication. The primary interest is likelyQueue.Item.task, which is oftenAbstractProject.Actions associated with the item is also likely of interest, such asCauseAction.- Returns:
 - returning non-null will determine the identity. If null is returned, the next
      configured 
QueueItemAuthenticatorwill be given a chance to authenticate the executor. If everything fails, fall back toQueue.Task.getDefaultAuthentication(). - Since:
 - 2.266
 
 - 
authenticate2
@CheckForNull public org.springframework.security.core.Authentication authenticate2(Queue.Task task) Determines the identity in which theQueue.Executablewill run as. The default implementation delegates toauthenticate2(hudson.model.Queue.Item)(there will be no associated actions).- Parameters:
 task- OftenAbstractProject.- Returns:
 - returning non-null will determine the identity. If null is returned, the next
      configured 
QueueItemAuthenticatorwill be given a chance to authenticate the executor. If everything fails, fall back toQueue.Task.getDefaultAuthentication(). - Since:
 - 2.266
 
 - 
authenticate
Deprecated. - 
authenticate
Deprecated.- Since:
 - 1.560
 
 - 
getDescriptor
Description copied from class:AbstractDescribableImplBy default looks for a nested class (conventionally namedDescriptorImpl) implementingDescriptorand marked withExtension.Gets the descriptor for this instance.
Descriptoris a singleton for every concreteDescribableimplementation, so ifa.getClass() == b.getClass()then by defaulta.getDescriptor() == b.getDescriptor()as well. (In rare cases a single implementation class may be used for instances with distinct descriptors.)- Specified by:
 getDescriptorin interfaceDescribable<QueueItemAuthenticator>- Overrides:
 getDescriptorin classAbstractDescribableImpl<QueueItemAuthenticator>
 
 - 
 
authenticate2(Queue.Item)