Package org.jvnet.hudson.test
Class MockQueueItemAuthenticator
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<jenkins.security.QueueItemAuthenticator>
-
- jenkins.security.QueueItemAuthenticator
-
- org.jvnet.hudson.test.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 toQueueItemAuthenticator
. To use, callQueueItemAuthenticatorConfiguration.get()
(orInject
it), then callQueueItemAuthenticatorConfiguration.getAuthenticators()
and add an instance of this.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MockQueueItemAuthenticator.DescriptorImpl
-
Constructor Summary
Constructors Constructor Description MockQueueItemAuthenticator()
Creates a new authenticator.MockQueueItemAuthenticator(Map<String,org.acegisecurity.Authentication> jobsToUsers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MockQueueItemAuthenticator
authenticate(String jobFullName, org.springframework.security.core.Authentication authentication)
org.springframework.security.core.Authentication
authenticate2(hudson.model.Queue.Item item)
-
-
-
Constructor Detail
-
MockQueueItemAuthenticator
public MockQueueItemAuthenticator()
Creates a new authenticator.
-
MockQueueItemAuthenticator
@Deprecated public MockQueueItemAuthenticator(Map<String,org.acegisecurity.Authentication> jobsToUsers)
-
-
Method Detail
-
authenticate
public MockQueueItemAuthenticator authenticate(String jobFullName, org.springframework.security.core.Authentication authentication)
- Parameters:
jobFullName
-Item.getFullName()
authentication
- such as fromUser.impersonate2()
-
authenticate2
public org.springframework.security.core.Authentication authenticate2(hudson.model.Queue.Item item)
- Overrides:
authenticate2
in classjenkins.security.QueueItemAuthenticator
-
-