Interface AuthenticationProvider
- 
- All Known Implementing Classes:
- AbstractJaasAuthenticationProvider,- AbstractLdapAuthenticationProvider,- AbstractUserDetailsAuthenticationProvider,- ActiveDirectoryLdapAuthenticationProvider,- AnonymousAuthenticationProvider,- AuthenticationManagerBeanDefinitionParser.NullAuthenticationProvider,- CasAuthenticationProvider,- DaoAuthenticationProvider,- DefaultJaasAuthenticationProvider,- JaasAuthenticationProvider,- JwtAuthenticationProvider,- LdapAuthenticationProvider,- OAuth2AuthorizationCodeAuthenticationProvider,- OAuth2LoginAuthenticationProvider,- OidcAuthorizationCodeAuthenticationProvider,- OpaqueTokenAuthenticationProvider,- OpenIDAuthenticationProvider,- PreAuthenticatedAuthenticationProvider,- RememberMeAuthenticationProvider,- RemoteAuthenticationProvider,- RunAsImplAuthenticationProvider,- TestingAuthenticationProvider
 
 public interface AuthenticationProviderIndicates a class can process a specificAuthenticationimplementation.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description Authenticationauthenticate(Authentication authentication)Performs authentication with the same contract asAuthenticationManager.authenticate(Authentication).booleansupports(java.lang.Class<?> authentication)Returnstrueif thisAuthenticationProvidersupports the indicatedAuthenticationobject.
 
- 
- 
- 
Method Detail- 
authenticateAuthentication authenticate(Authentication authentication) throws AuthenticationException Performs authentication with the same contract asAuthenticationManager.authenticate(Authentication).- Parameters:
- authentication- the authentication request object.
- Returns:
- a fully authenticated object including credentials. May return
 nullif theAuthenticationProvideris unable to support authentication of the passedAuthenticationobject. In such a case, the nextAuthenticationProviderthat supports the presentedAuthenticationclass will be tried.
- Throws:
- AuthenticationException- if authentication fails.
 
 - 
supportsboolean supports(java.lang.Class<?> authentication) Returnstrueif thisAuthenticationProvidersupports the indicatedAuthenticationobject.Returning truedoes not guarantee anAuthenticationProviderwill be able to authenticate the presented instance of theAuthenticationclass. It simply indicates it can support closer evaluation of it. AnAuthenticationProvidercan still returnnullfrom theauthenticate(Authentication)method to indicate anotherAuthenticationProvidershould be tried.Selection of an AuthenticationProvidercapable of performing authentication is conducted at runtime theProviderManager.- Parameters:
- authentication-
- Returns:
- trueif the implementation can more closely evaluate the- Authenticationclass presented
 
 
- 
 
-