@Component(value="core_SystemAuthenticator") public class SystemAuthenticatorImpl extends SystemAuthenticatorSupport implements SystemAuthenticator
SystemAuthenticatorSupport.NullAuthenticationSystemAuthenticator.AuthenticatedOperation<T>| Modifier and Type | Field and Description |
|---|---|
protected org.springframework.security.authentication.AuthenticationManager |
authenticationManager |
NULL_AUTHENTICATION, threadLocalStack| Constructor and Description |
|---|
SystemAuthenticatorImpl() |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.security.core.Authentication |
begin()
Authenticate as the 'system' user.
|
org.springframework.security.core.Authentication |
begin(java.lang.String login)
Begins an authenticated code block.
|
protected void |
beginServerSessionOnStartup(org.springframework.context.event.ContextRefreshedEvent event) |
void |
end()
End of an authenticated code block.
|
protected void |
endServerSessionOnStartup(org.springframework.context.event.ContextRefreshedEvent event) |
void |
runWithSystem(java.lang.Runnable operation)
Execute code as the 'system' user.
|
void |
runWithUser(java.lang.String login,
java.lang.Runnable operation)
Execute code on behalf of the specified user.
|
<T> T |
withSystem(SystemAuthenticator.AuthenticatedOperation<T> operation)
Execute code as the 'system' user and return a result.
|
<T> T |
withUser(java.lang.String login,
SystemAuthenticator.AuthenticatedOperation<T> operation)
Execute code on behalf of the specified user and return a result.
|
pollAuthentication, pushAuthentication@Autowired(required=false) protected org.springframework.security.authentication.AuthenticationManager authenticationManager
@EventListener @Order(value=105) protected void beginServerSessionOnStartup(org.springframework.context.event.ContextRefreshedEvent event)
@EventListener @Order(value=995) protected void endServerSessionOnStartup(org.springframework.context.event.ContextRefreshedEvent event)
public org.springframework.security.core.Authentication begin(@Nullable
java.lang.String login)
SystemAuthenticatorSystemAuthenticator.end().
Subsequent SystemAuthenticator.end() method must be called in "finally" section.begin in interface SystemAuthenticatorlogin - user login. If null, authenticates as the 'system' user.Authentication objectpublic org.springframework.security.core.Authentication begin()
SystemAuthenticatorSystemAuthenticator.begin(String) with null parameter.begin in interface SystemAuthenticatorpublic void end()
SystemAuthenticatorend in interface SystemAuthenticatorpublic <T> T withUser(@Nullable
java.lang.String login,
SystemAuthenticator.AuthenticatedOperation<T> operation)
SystemAuthenticatorwithUser in interface SystemAuthenticatorlogin - user login. If null, the system session is used.operation - code to executepublic void runWithUser(@Nullable
java.lang.String login,
java.lang.Runnable operation)
SystemAuthenticatorrunWithUser in interface SystemAuthenticatorlogin - user login. If null, the system session is used.operation - code to executepublic <T> T withSystem(SystemAuthenticator.AuthenticatedOperation<T> operation)
SystemAuthenticatorwithSystem in interface SystemAuthenticatoroperation - code to executepublic void runWithSystem(java.lang.Runnable operation)
SystemAuthenticatorrunWithSystem in interface SystemAuthenticatoroperation - code to execute