public class CachingAuthenticationProvider extends Object implements org.springframework.security.authentication.AuthenticationProvider
| Constructor and Description |
|---|
CachingAuthenticationProvider(org.springframework.security.authentication.AuthenticationProvider delegate) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.security.core.Authentication |
authenticate(org.springframework.security.core.Authentication authentication) |
boolean |
isCacheEnabled() |
void |
setCacheEnabled(boolean cacheEnabled) |
boolean |
supports(Class<?> authentication) |
public CachingAuthenticationProvider(org.springframework.security.authentication.AuthenticationProvider delegate)
@Cacheable(condition="#root.target.isCacheEnabled()",
unless="!#result.isAuthenticated()",
cacheNames="authCache",
keyGenerator="authKeyGenerator")
public org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication)
throws org.springframework.security.core.AuthenticationException
authenticate in interface org.springframework.security.authentication.AuthenticationProviderorg.springframework.security.core.AuthenticationExceptionpublic boolean supports(Class<?> authentication)
supports in interface org.springframework.security.authentication.AuthenticationProviderpublic boolean isCacheEnabled()
public void setCacheEnabled(boolean cacheEnabled)
Copyright © 2019. All rights reserved.