Class DBAuthenticationProvider

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.MessageSourceAware, org.springframework.security.authentication.AuthenticationProvider

    public class DBAuthenticationProvider
    extends org.springframework.security.authentication.dao.DaoAuthenticationProvider
    this class makes it possible to skip password check when we are using database username and password as the means of authentication
    Author:
    Masoud Kalali
    • Field Summary

      • Fields inherited from class org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider

        hideUserNotFoundExceptions, messages
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void additionalAuthenticationChecks​(org.springframework.security.core.userdetails.UserDetails userDetails, org.springframework.security.authentication.UsernamePasswordAuthenticationToken authentication)  
      • Methods inherited from class org.springframework.security.authentication.dao.DaoAuthenticationProvider

        createSuccessAuthentication, doAfterPropertiesSet, getPasswordEncoder, getUserDetailsService, retrieveUser, setPasswordEncoder, setUserDetailsPasswordService, setUserDetailsService
      • Methods inherited from class org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider

        afterPropertiesSet, authenticate, getPostAuthenticationChecks, getPreAuthenticationChecks, getUserCache, isForcePrincipalAsString, isHideUserNotFoundExceptions, setAuthoritiesMapper, setForcePrincipalAsString, setHideUserNotFoundExceptions, setMessageSource, setPostAuthenticationChecks, setPreAuthenticationChecks, setUserCache, supports
    • Constructor Detail

      • DBAuthenticationProvider

        public DBAuthenticationProvider()
    • Method Detail

      • additionalAuthenticationChecks

        protected void additionalAuthenticationChecks​(org.springframework.security.core.userdetails.UserDetails userDetails,
                                                      org.springframework.security.authentication.UsernamePasswordAuthenticationToken authentication)
                                               throws org.springframework.security.core.AuthenticationException
        Overrides:
        additionalAuthenticationChecks in class org.springframework.security.authentication.dao.DaoAuthenticationProvider
        Throws:
        org.springframework.security.core.AuthenticationException