Spring Security - multiple authentication-providers

后端 未结 2 1173
说谎
说谎 2020-12-19 21:11

My web app has multiple authentication managers (one for API one for WEB access). The api should have a basic auth service only - configured via the spring security markup a

2条回答
  •  青春惊慌失措
    2020-12-19 22:07

    In namespace the name can be add it in the java with the @Service("userDetailsService") with a name.

    You can also define beans and add them to the chain.

    
        
        
    
    
        
        
    
    
    
        [...]
    
    

    the _authenticationManager is the name of the bean that is registered in namespace.

    This would be executed before the basic auth.

提交回复
热议问题