繁体   English   中英

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

[英]Using my custom External Login with spring boot oauth2 (authorization grant type)?

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

我怎么能做到这一点?

谢谢

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

或实现 AuthenticationProvider class 并编写您的身份验证逻辑。

在那之后

@Configuration
public class YourWebSecurityConfiguration extends WebSecurityConfigurerAdapter{

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

        auth.authenticationProvider(yourAuthProviderBean);

  }
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM