Class CopAuthenticationProvider
java.lang.Object
callofproject.dev.authentication.config.CopAuthenticationProvider
- All Implemented Interfaces:
org.springframework.security.authentication.AuthenticationProvider
@Component
public class CopAuthenticationProvider
extends Object
implements org.springframework.security.authentication.AuthenticationProvider
This class is a Spring Component class that provides authentication for the application.
-
Constructor Summary
ConstructorsConstructorDescriptionCopAuthenticationProvider
(callofproject.dev.repository.authentication.dal.UserManagementServiceHelper userManagementServiceHelper, org.springframework.security.crypto.password.PasswordEncoder passwordEncoder) Constructs a new CopAuthenticationProvider. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.Authentication
authenticate
(org.springframework.security.core.Authentication authentication) Performs authentication with the same contract as AuthenticationManager.authenticate(Authentication).boolean
Returns true if this AuthenticationProvider supports the indicated Authentication object.
-
Constructor Details
-
CopAuthenticationProvider
public CopAuthenticationProvider(callofproject.dev.repository.authentication.dal.UserManagementServiceHelper userManagementServiceHelper, org.springframework.security.crypto.password.PasswordEncoder passwordEncoder) Constructs a new CopAuthenticationProvider.- Parameters:
userManagementServiceHelper
- The UserManagementServiceHelper object to be injected.
-
-
Method Details
-
authenticate
public org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication) throws org.springframework.security.core.AuthenticationException Performs authentication with the same contract as AuthenticationManager.authenticate(Authentication).- Specified by:
authenticate
in interfaceorg.springframework.security.authentication.AuthenticationProvider
- Parameters:
authentication
- the authentication request object.- Returns:
- Authentication
- Throws:
org.springframework.security.core.AuthenticationException
- if the authentication fails
-
supports
Returns true if this AuthenticationProvider supports the indicated Authentication object.- Specified by:
supports
in interfaceorg.springframework.security.authentication.AuthenticationProvider
- Parameters:
authentication
- the authentication request object.- Returns:
- boolean
-