# auth2-vanilla **Repository Path**: vencoln/auth2-vanilla ## Basic Information - **Project Name**: auth2-vanilla - **Description**: spring cloud oauth2的入门项目,主要参考资料:https://github.com/spring-guides/tut-spring-security-and-angular-js/blob/master/oauth2-vanilla/README.adoc - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2019-05-17 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # auth2-vanilla #### 介绍 spring cloud oauth2的入门项目,主要参考资料:https://github.com/spring-guides/tut-spring-security-and-angular-js/blob/master/oauth2-vanilla/README.adoc \ uiserver服务中,使用vue代替了angular,但是没有构建单页应用。 项目存在多个分支,不同分支是我学习的不同阶段。 #### oauth2-base分支 根据资料搭建的oauth2服务,绝大部分使用了默认配置。 ##### 参考资料 * [理解OAuth 2.0](http://www.ruanyifeng.com/blog/2014/05/oauth_2_0.html) * [oauth2-vanilla/README.adoc](https://github.com/spring-guides/tut-spring-security-and-angular-js/blob/master/oauth2-vanilla/README.adoc) * [Spring Security 与 OAuth2系列文章](https://www.jianshu.com/p/d80061e6d900) #### zuul-sso分支 根据资料添加单点登录功能。 #### zuul-sso-rebuild分支 重构了zuul-sso分支的代码,并添加了部分验证功能。 #### toGreenwich分支 和分支的命名一样,这条分支上,主要工作是把Spring cloud 升级到Greenwich.RELEASE版本,Spring Boot 升级到2.1.4.RELEASE版本。\ 直接修改Spring boot 和Spring Cloud的版本号,下载依赖,rebuild项目,运行看看效果。\ 其他需要修改的地方: * zuul的依赖。 * 加密方式。加密方式需要修改两个地方,一个是user表中的密码,第二个是oauth_client_details表中的客户端秘钥。如果懒得写注册功能,那就直接是用authserver中的tool生产密码,再手动填写到数据库吧。 * authserver模块被大改了一下。这个版本中同时使用了WebSecurityConfig和ResourceServerConfig,这样才是合理的方式。 ##### 参考资料 * [Spring Security 无法登陆](https://blog.csdn.net/canon_in_d_major/article/details/79675033) * [Zuul丢失Cookie的解决方案](https://blog.csdn.net/lindan1984/article/details/79308396) 参考资料除了这些外还有一些,但是没找到网址。 #### master分支 每个分支的内容学习完成后都会被合并到master分支上。