简体   繁体   中英

Spring Security OAuth2 custom success user

I want to add OAuth authorization wuth Azure AD. I use this guide to setup this. The problem is that I want to use Azure AD only as a Trust Provider(like user belong to specific group aka directory), but I don't want to work with OidcUser Spring Security User.

Process that I would like to have: redirect user to Microsoft login page, receive user info with all tokens, handle request on my server side and authoriza my custom implementation of Spring Security UserDetails based on email from Microsoft

If your scenario is to eliminate the user authentication completely and your server to directly authenticate then it is possible with client credential flow .

Based on the process you have mentioned in the second paragraph which involves user it is possible with authentication code flow.

Also, for code sample and implementation please refer Microsoft Github Document .

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