What is the default AuthenticationManager in Spring-Security? How does it authenticate?

后端 未结 3 2031
自闭症患者
自闭症患者 2020-12-12 13:20

I have the following bean defined:


    

        
3条回答
  •  攒了一身酷
    2020-12-12 13:30

    Spring Security ships only one real AuthenticationManager implementation:

    org.springframework.security.authentication.ProviderManager
    

    This uses different AuthenticationProvider for the authentication tasks

    The AuthenticationManagerBeanDefinitionParser is responsible to parse its java doc states:

    Registers the central ProviderManager used by the namespace configuration, and allows the configuration of an alias, allowing users to reference it in their beans and clearly see where the name is coming from.

    It creates the ProviderManager and adds the specified provides. If no provides is specified in the xml, then it adds an NullAuthenticationProvider. This is at least a provider that does noting than preventing configuration exceptions.

提交回复
热议问题