Class IpAddressAuthProvider

  • All Implemented Interfaces:
    org.springframework.security.authentication.AuthenticationProvider

    @Component
    public class IpAddressAuthProvider
    extends Object
    implements org.springframework.security.authentication.AuthenticationProvider
    • Constructor Detail

      • IpAddressAuthProvider

        public IpAddressAuthProvider​(@Autowired
                                     BannedIpRepository bannedIpRepository)
    • Method Detail

      • supports

        public boolean supports​(Class<?> authentication)
        Specified by:
        supports in interface org.springframework.security.authentication.AuthenticationProvider
      • authenticate

        public org.springframework.security.core.Authentication authenticate​(org.springframework.security.core.Authentication authentication)
                                                                      throws org.springframework.security.core.AuthenticationException
        Invokes the IP Block checks
        Specified by:
        authenticate in interface org.springframework.security.authentication.AuthenticationProvider
        Throws:
        org.springframework.security.core.AuthenticationException