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

    Constructors
    Constructor
    Description
    CopAuthenticationProvider(callofproject.dev.repository.authentication.dal.UserManagementServiceHelper userManagementServiceHelper, org.springframework.security.crypto.password.PasswordEncoder passwordEncoder)
    Constructs a new CopAuthenticationProvider.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.security.core.Authentication
    authenticate(org.springframework.security.core.Authentication authentication)
    Performs authentication with the same contract as AuthenticationManager.authenticate(Authentication).
    boolean
    supports(Class<?> authentication)
    Returns true if this AuthenticationProvider supports the indicated Authentication object.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 interface org.springframework.security.authentication.AuthenticationProvider
      Parameters:
      authentication - the authentication request object.
      Returns:
      Authentication
      Throws:
      org.springframework.security.core.AuthenticationException - if the authentication fails
    • supports

      public boolean supports(Class<?> authentication)
      Returns true if this AuthenticationProvider supports the indicated Authentication object.
      Specified by:
      supports in interface org.springframework.security.authentication.AuthenticationProvider
      Parameters:
      authentication - the authentication request object.
      Returns:
      boolean