Two separate UserDetailsService Implementations

后端 未结 1 920
轻奢々
轻奢々 2021-01-26 15:59

Is it possible to have to have UserDetailsService implementations in a single web application ? To be more precise, my requirement is I have a Servlet which listens to http POST

1条回答
  •  不要未来只要你来
    2021-01-26 16:51

    I am not sure how nested authentication may be implemented with Spring Security. But you can have two separate UserDetailsService implementations. Consider case when you have two types of URLs /** and /admin/**, and they can be used by two separate groups of users. Starting from Spring Security 3.1 you can use multiple http tags (see corresponding documentation):

    
        
        ...
    
    
    
        
    
    
    
    
    
    
        
        ...
    
    
    
        
    
    
    
    

    You can even declare different entry points for each http tag using entry-point-ref attribute.

    0 讨论(0)
提交回复
热议问题