Java 使用Spring Security添加社交登录

Java 使用Spring Security添加社交登录,java,spring,spring-mvc,spring-security,Java,Spring,Spring Mvc,Spring Security,我正在尝试在我的Spring安全项目中集成多个社交登录(如Facebook、Twitter、Linkedin) 我猜我必须在这里做一些更改: public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception { auth.inMemoryAuthentication().withUser("user").password("123456").roles("USER"); }

我正在尝试在我的Spring安全项目中集成多个社交登录(如Facebook、Twitter、Linkedin)

我猜我必须在这里做一些更改:

public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
        auth.inMemoryAuthentication().withUser("user").password("123456").roles("USER");

    } 
我不确定我需要做什么更改,如果我认证vai DB服务,我知道我将使用:

public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
        auth.userDetailsService(userDetailsService).passwordEncoder(passwordEncoder());
    }
但是,如果我们想对Facebook、Twitter、Linkedin等进行身份验证,该怎么办呢?我是否创建了一个包装服务,但它实际上是如何工作的,因为工作流将转到Twitter、FB,并且会有一个回调

注意:我不想使用Spring Social