intermediateCustom AuthenticationProvider & Exception Handling
What are the two methods every AuthenticationProvider must implement, and what does each do?
authenticate(Authentication) performs the actual verification and returns a fully-populated, authenticated Authentication object on success (or throws AuthenticationException on failure). supports(Class<?>) tells ProviderManager whether this provider is capable of handling a given Authentication implementation type, so ProviderManager can pick the right provider without hardcoded type-checking logic.
This is a Pro chapter
Sign in, then upgrade to Pro or Power to unlock this and the full Spring Ecosystem Mastery library.
What are the two methods every AuthenticationProvider must implement, and what does each do?