public abstract class QueueItemAuthenticator extends AbstractDescribableImpl<QueueItemAuthenticator> implements ExtensionPoint
Queue.Executables under a specific identity for better access control.
You must override either authenticate(hudson.model.Queue.Item), or authenticate(hudson.model.Queue.Task), or both.QueueItemAuthenticatorConfiguration,
Queue.Item.authenticate(),
Queue.Task.getDefaultAuthentication()ExtensionPoint.LegacyInstancesAreScopedToHudson| Constructor and Description |
|---|
QueueItemAuthenticator() |
| Modifier and Type | Method and Description |
|---|---|
org.acegisecurity.Authentication |
authenticate(Queue.Item item)
Determines the identity in which the
Queue.Executable will run as. |
org.acegisecurity.Authentication |
authenticate(Queue.Task task)
Determines the identity in which the
Queue.Executable will run as. |
QueueItemAuthenticatorDescriptor |
getDescriptor()
By default looks for a nested class (conventionally named
DescriptorImpl) implementing Descriptor and marked with Extension. |
@CheckForNull public org.acegisecurity.Authentication authenticate(Queue.Item item)
Queue.Executable will run as.
The default implementation delegates to authenticate(hudson.model.Queue.Task).item - The contextual information to assist the authentication.
The primary interest is likely Queue.Item.task, which is often AbstractProject.
Actions associated with the item is also likely of interest, such as CauseAction.QueueItemAuthenticator will be given a chance to authenticate
the executor. If everything fails, fall back to Queue.Task.getDefaultAuthentication().@CheckForNull public org.acegisecurity.Authentication authenticate(Queue.Task task)
Queue.Executable will run as.
The default implementation delegates to authenticate(hudson.model.Queue.Item) (there will be no associated actions).task - Often AbstractProject.QueueItemAuthenticator will be given a chance to authenticate
the executor. If everything fails, fall back to Queue.Task.getDefaultAuthentication().public QueueItemAuthenticatorDescriptor getDescriptor()
AbstractDescribableImplDescriptorImpl) implementing Descriptor and marked with Extension.
Gets the descriptor for this instance.
Descriptor is a singleton for every concrete Describable
implementation, so if a.getClass() == b.getClass() then by default
a.getDescriptor() == b.getDescriptor() as well.
(In rare cases a single implementation class may be used for instances with distinct descriptors.)
getDescriptor in interface Describable<QueueItemAuthenticator>getDescriptor in class AbstractDescribableImpl<QueueItemAuthenticator>Copyright © 2019. All rights reserved.