Interface AuthenticationProvider
- All Known Implementing Classes:
AbstractJaasAuthenticationProvider,AbstractLdapAuthenticationProvider,AbstractUserDetailsAuthenticationProvider,ActiveDirectoryLdapAuthenticationProvider,AnonymousAuthenticationProvider,AuthenticationManagerBeanDefinitionParser.NullAuthenticationProvider,DaoAuthenticationProvider,DefaultJaasAuthenticationProvider,JaasAuthenticationProvider,JwtAuthenticationProvider,LdapAuthenticationProvider,OAuth2AuthorizationCodeAuthenticationProvider,OAuth2LoginAuthenticationProvider,OidcAuthorizationCodeAuthenticationProvider,OpaqueTokenAuthenticationProvider,OpenSaml4AuthenticationProvider,PreAuthenticatedAuthenticationProvider,RememberMeAuthenticationProvider,RunAsImplAuthenticationProvider,TestingAuthenticationProvider
public interface AuthenticationProvider
Indicates a class can process a specific
Authentication implementation.-
Method Summary
Modifier and TypeMethodDescriptionauthenticate(Authentication authentication) Performs authentication with the same contract asAuthenticationManager.authenticate(Authentication).booleanReturnstrueif thisAuthenticationProvidersupports the indicatedAuthenticationobject.
-
Method Details
-
authenticate
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.
-
supports
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 theAuthenticationclass presented
-