public abstract class AbstractUserDetailsAuthenticationProvider extends java.lang.Object implements AuthenticationProvider<UsernamePasswordAuthenticationToken>
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractUserDetailsAuthenticationProvider.DefaultPostAuthenticationChecks |
static class |
AbstractUserDetailsAuthenticationProvider.DefaultPreAuthenticationChecks |
| Modifier and Type | Field and Description |
|---|---|
protected org.springframework.context.support.MessageSourceAccessor |
messages |
| Constructor and Description |
|---|
AbstractUserDetailsAuthenticationProvider() |
public AbstractUserDetailsAuthenticationProvider()
public boolean supports(java.lang.Class<? extends Authentication> authentication)
AuthenticationProvidersupports in interface AuthenticationProvider<UsernamePasswordAuthenticationToken>protected abstract UserDetails retrieveUser(java.lang.String username, UsernamePasswordAuthenticationToken token)
username - 用户名token - 密码public Authentication authenticate(UsernamePasswordAuthenticationToken authentication) throws AuthenticationException
AuthenticationProviderauthenticate in interface AuthenticationProvider<UsernamePasswordAuthenticationToken>AuthenticationExceptionprotected Authentication createSuccessAuthentication(java.lang.Object principal, Authentication authentication, UserDetails user)
protected abstract void additionalAuthenticationChecks(UserDetails userDetails, UsernamePasswordAuthenticationToken authentication) throws AuthenticationException
userDetails - authentication - AuthenticationExceptionpublic void setPreAuthenticationChecks(UserDetailsChecker preAuthenticationChecks)
public void setPostAuthenticationChecks(UserDetailsChecker postAuthenticationChecks)
public void setMessages(org.springframework.context.support.MessageSourceAccessor messages)
public void setHideUserNotFoundExceptions(boolean hideUserNotFoundExceptions)
public UserDetailsChecker getPreAuthenticationChecks()
public UserDetailsChecker getPostAuthenticationChecks()