个人 OAuth2 全部文章 Spring Security 与 OAuth2(介绍):https://www.jianshu.com/p/68f22f9a00ee Spring Security 与 OAuth2(授权服务器):https://www.jianshu.com/p/227f7e7503cb Spring Security 与 OAuth2(资源服务器):https://www.jianshu.com/p/6dd03375224d Spring Security 与 OAuth2(…
思路: spring security 1.用户输入用户名密码. 2.验证:从库中(可以是内存.数据库等)查询该用户的密码.角色,验证用户名和密码是否正确.如果正确,则将填充Authentication(UsernamePasswordAuthenticationToken是其实现类),填充Authentication,会将用户的角色也填充进去. Authentication authentication= new UsernamePasswordAuthenticationToken(auth…