Class MockQueueItemAuthenticator

  • All Implemented Interfaces:
    hudson.ExtensionPoint, hudson.model.Describable<jenkins.security.QueueItemAuthenticator>

    public final class MockQueueItemAuthenticator
    extends jenkins.security.QueueItemAuthenticator
    Allows testing of anything related to QueueItemAuthenticator. To use, call QueueItemAuthenticatorConfiguration.get() (or Inject it), then call QueueItemAuthenticatorConfiguration.getAuthenticators() and add an instance of this.
    • Method Detail

      • authenticate

        public MockQueueItemAuthenticator authenticate​(String jobFullName,
                                                       org.springframework.security.core.Authentication authentication)
        Parameters:
        jobFullName - Item.getFullName()
        authentication - such as from User.impersonate2()
      • authenticate2

        public org.springframework.security.core.Authentication authenticate2​(hudson.model.Queue.Item item)
        Overrides:
        authenticate2 in class jenkins.security.QueueItemAuthenticator