将我的自定义外部登录与spring boot oauth2(授权授予类型)一起使用?

我必须用spring boot Oauth2和spring boot security实现Oauth2,但是我有一个问题,我想用自定义的外部登录页面对用户进行身份验证,并且登录成功后,我想再次重定向到授权端点以授权客户端请求资源

我该怎么做?

谢谢

sdaflkhsdjklgnfshgjs 回答:将我的自定义外部登录与spring boot oauth2(授权授予类型)一起使用?

使用自定义身份验证提供程序。

或实现AuthenticationProvider类并编写身份验证逻辑。

然后是

@Configuration
public class YourWebSecurityConfiguration extends WebSecurityConfigurerAdapter{

@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {

        auth.authenticationProvider(yourAuthProviderBean);

  }
}
本文链接:https://www.f2er.com/3130030.html

大家都在问