Refactoring of AuthenticationProvider SPI