简体   繁体   中英

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

I have to implement Oauth2 with spring boot Oauth2 and spring boot security, but I have one problem, I want to authenticate user with my custom external login page and after login success i want to redirect again to authorization endpoint to authorize client for request resources

How I can do this?

Thanks

Use a custom authentication provider.

or implement AuthenticationProvider class and write your authentication logic.

and after that

@Configuration
public class YourWebSecurityConfiguration extends WebSecurityConfigurerAdapter{

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

        auth.authenticationProvider(yourAuthProviderBean);

  }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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