Interface AuthenticationProvider
- All Known Implementing Classes:
AbstractJaasAuthenticationProvider,AbstractLdapAuthenticationProvider,AbstractUserDetailsAuthenticationProvider,ActiveDirectoryLdapAuthenticationProvider,AnonymousAuthenticationProvider,AuthenticationManagerBeanDefinitionParser.NullAuthenticationProvider,CasAuthenticationProvider,ClientSecretAuthenticationProvider,DaoAuthenticationProvider,DefaultJaasAuthenticationProvider,DPoPAuthenticationProvider,JaasAuthenticationProvider,JwtAuthenticationProvider,JwtClientAssertionAuthenticationProvider,KerberosAuthenticationProvider,KerberosServiceAuthenticationProvider,LdapAuthenticationProvider,OAuth2AuthorizationCodeAuthenticationProvider,OAuth2AuthorizationCodeAuthenticationProvider,OAuth2AuthorizationCodeRequestAuthenticationProvider,OAuth2AuthorizationConsentAuthenticationProvider,OAuth2ClientCredentialsAuthenticationProvider,OAuth2ClientRegistrationAuthenticationProvider,OAuth2DeviceAuthorizationConsentAuthenticationProvider,OAuth2DeviceAuthorizationRequestAuthenticationProvider,OAuth2DeviceCodeAuthenticationProvider,OAuth2DeviceVerificationAuthenticationProvider,OAuth2LoginAuthenticationProvider,OAuth2PushedAuthorizationRequestAuthenticationProvider,OAuth2RefreshTokenAuthenticationProvider,OAuth2TokenExchangeAuthenticationProvider,OAuth2TokenIntrospectionAuthenticationProvider,OAuth2TokenRevocationAuthenticationProvider,OidcAuthorizationCodeAuthenticationProvider,OidcClientConfigurationAuthenticationProvider,OidcClientRegistrationAuthenticationProvider,OidcLogoutAuthenticationProvider,OidcUserInfoAuthenticationProvider,OneTimeTokenAuthenticationProvider,OpaqueTokenAuthenticationProvider,PreAuthenticatedAuthenticationProvider,PublicClientAuthenticationProvider,RememberMeAuthenticationProvider,RunAsImplAuthenticationProvider,TestingAuthenticationProvider,WebAuthnAuthenticationProvider,X509ClientCertificateAuthenticationProvider
public interface AuthenticationProvider
Indicates a class can process a specific
Authentication implementation.-
Method Summary
Modifier and TypeMethodDescription@Nullable Authenticationauthenticate(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 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 by theProviderManager.- Parameters:
authentication-- Returns:
trueif the implementation can more closely evaluate theAuthenticationclass presented
-