Interface AuthenticationProvider
- All Known Implementing Classes:
- AbstractJaasAuthenticationProvider,- AbstractLdapAuthenticationProvider,- AbstractUserDetailsAuthenticationProvider,- ActiveDirectoryLdapAuthenticationProvider,- AnonymousAuthenticationProvider,- AuthenticationManagerBeanDefinitionParser.NullAuthenticationProvider,- CasAuthenticationProvider,- DaoAuthenticationProvider,- DefaultJaasAuthenticationProvider,- DPoPAuthenticationProvider,- JaasAuthenticationProvider,- JwtAuthenticationProvider,- LdapAuthenticationProvider,- OAuth2AuthorizationCodeAuthenticationProvider,- OAuth2LoginAuthenticationProvider,- OidcAuthorizationCodeAuthenticationProvider,- OneTimeTokenAuthenticationProvider,- OpaqueTokenAuthenticationProvider,- PreAuthenticatedAuthenticationProvider,- RememberMeAuthenticationProvider,- RunAsImplAuthenticationProvider,- TestingAuthenticationProvider,- WebAuthnAuthenticationProvider
public interface AuthenticationProvider
Indicates a class can process a specific
 
Authentication implementation.- 
Method SummaryModifier and TypeMethodDescriptionauthenticate(Authentication authentication) Performs authentication with the same contract asAuthenticationManager.authenticate(Authentication).booleanReturnstrueif thisAuthenticationProvidersupports the indicatedAuthenticationobject.
- 
Method Details- 
authenticatePerforms 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.
 
- 
supportsReturnstrueif thisAuthenticationProvidersupports the indicatedAuthenticationobject.Returning truedoes not guarantee anAuthenticationProviderwill be able to authenticate the presentedAuthenticationobject. 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
 
 
-