Class MockSecurityRealm
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<SecurityRealm>
-
- hudson.security.SecurityRealm
-
- hudson.security.AbstractPasswordBasedSecurityRealm
-
- org.jenkinsci.plugins.mocksecurityrealm.MockSecurityRealm
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<SecurityRealm>
public class MockSecurityRealm extends AbstractPasswordBasedSecurityRealm
Mock security realm with no actual security.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MockSecurityRealm.DescriptorImpl
-
Nested classes/interfaces inherited from class hudson.security.SecurityRealm
SecurityRealm.SecurityComponents
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
-
Fields inherited from class hudson.security.SecurityRealm
AUTHENTICATED_AUTHORITY, AUTHENTICATED_AUTHORITY2, LIST, NO_AUTHENTICATION
-
-
Constructor Summary
Constructors Constructor Description MockSecurityRealm(String data, Long delayMillis, boolean randomDelay, IdStrategy userIdStrategy, IdStrategy groupIdStrategy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.springframework.security.core.userdetails.UserDetails
authenticate2(String username, String password)
void
endOutage()
Ends the simulated outage.String
getData()
Long
getDelayMillis()
IdStrategy
getGroupIdStrategy()
IdStrategy
getUserIdStrategy()
boolean
isRandomDelay()
GroupDetails
loadGroupByGroupname2(String groupname, boolean fetchMembers)
org.springframework.security.core.userdetails.UserDetails
loadUserByUsername2(String username)
void
outage()
Starts a simulated outage.-
Methods inherited from class hudson.security.AbstractPasswordBasedSecurityRealm
authenticate, createSecurityComponents, loadGroupByGroupname, loadUserByUsername
-
Methods inherited from class hudson.security.SecurityRealm
all, allowsSignup, canLogOut, commenceSignup, commonFilters, createCliAuthenticator, createFilter, doCaptcha, doLogout, getAuthenticationGatewayUrl, getCaptchaSupport, getCaptchaSupportDescriptors, getDescriptor, getFrom, getLoginUrl, getPostLogOutUrl, getPostLogOutUrl2, getSecurityComponents, loadGroupByGroupname, setCaptchaSupport, validateCaptcha
-
-
-
-
Constructor Detail
-
MockSecurityRealm
@DataBoundConstructor public MockSecurityRealm(String data, Long delayMillis, boolean randomDelay, IdStrategy userIdStrategy, IdStrategy groupIdStrategy)
-
-
Method Detail
-
outage
public void outage()
Starts a simulated outage.
-
endOutage
public void endOutage()
Ends the simulated outage.
-
getData
public String getData()
-
getDelayMillis
public Long getDelayMillis()
-
isRandomDelay
public boolean isRandomDelay()
-
getUserIdStrategy
public IdStrategy getUserIdStrategy()
- Overrides:
getUserIdStrategy
in classSecurityRealm
-
getGroupIdStrategy
public IdStrategy getGroupIdStrategy()
- Overrides:
getGroupIdStrategy
in classSecurityRealm
-
authenticate2
protected org.springframework.security.core.userdetails.UserDetails authenticate2(String username, String password) throws org.springframework.security.core.AuthenticationException
- Overrides:
authenticate2
in classAbstractPasswordBasedSecurityRealm
- Throws:
org.springframework.security.core.AuthenticationException
-
loadUserByUsername2
public org.springframework.security.core.userdetails.UserDetails loadUserByUsername2(String username) throws org.springframework.security.core.userdetails.UsernameNotFoundException
- Overrides:
loadUserByUsername2
in classAbstractPasswordBasedSecurityRealm
- Throws:
org.springframework.security.core.userdetails.UsernameNotFoundException
-
loadGroupByGroupname2
public GroupDetails loadGroupByGroupname2(String groupname, boolean fetchMembers) throws org.springframework.security.core.userdetails.UsernameNotFoundException
- Overrides:
loadGroupByGroupname2
in classAbstractPasswordBasedSecurityRealm
- Throws:
org.springframework.security.core.userdetails.UsernameNotFoundException
-
-