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)
.boolean
Returnstrue
if thisAuthenticationProvider
supports the indicatedAuthentication
object.
-
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
null
if theAuthenticationProvider
is unable to support authentication of the passedAuthentication
object. In such a case, the nextAuthenticationProvider
that supports the presentedAuthentication
class will be tried. - Throws:
AuthenticationException
- if authentication fails.
-
supports
Returnstrue
if thisAuthenticationProvider
supports the indicatedAuthentication
object.Returning
true
does not guarantee anAuthenticationProvider
will be able to authenticate the presented instance of theAuthentication
class. It simply indicates it can support closer evaluation of it. AnAuthenticationProvider
can still returnnull
from theauthenticate(Authentication)
method to indicate anotherAuthenticationProvider
should be tried.Selection of an
AuthenticationProvider
capable of performing authentication is conducted at runtime theProviderManager
.- Parameters:
authentication
-- Returns:
true
if the implementation can more closely evaluate theAuthentication
class presented
-