Custom Authentication provider with Spring Security and Java Config -
how can define custom authentication provider using spring security java configurations? perform login checking credentials on own database.
the following need (customauthenticationprovider
implementation needs managed spring)
@configuration @enablewebmvcsecurity public class websecurityconfig extends websecurityconfigureradapter { @autowired private customauthenticationprovider customauthenticationprovider; @override protected void configure(httpsecurity http) throws exception { /** * stuff here */ } @override protected void configure(authenticationmanagerbuilder auth) throws exception { auth.authenticationprovider(customauthenticationprovider); } }
Comments
Post a Comment