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 to
QueueItemAuthenticator
.
To use, call QueueItemAuthenticatorConfiguration.get()
(or Inject
it),
then call QueueItemAuthenticatorConfiguration.getAuthenticators()
and add an instance of this.-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
ConstructorDescriptionCreates a new authenticator.MockQueueItemAuthenticator
(Map<String, org.acegisecurity.Authentication> jobsToUsers) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionauthenticate
(String jobFullName, org.springframework.security.core.Authentication authentication) org.springframework.security.core.Authentication
authenticate2
(hudson.model.Queue.Item item) Methods inherited from class jenkins.security.QueueItemAuthenticator
authenticate, authenticate, authenticate2, getDescriptor
-
Constructor Details
-
MockQueueItemAuthenticator
public MockQueueItemAuthenticator()Creates a new authenticator. -
MockQueueItemAuthenticator
@Deprecated public MockQueueItemAuthenticator(Map<String, org.acegisecurity.Authentication> jobsToUsers)
-
-
Method Details
-
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
-
MockQueueItemAuthenticator()
plusauthenticate(java.lang.String, org.springframework.security.core.Authentication)