Oauth2.0 Demo

通过实现github授权登录来理解Oauth2.0协议

准备

  • java1.8
  • Maven

注意事项

client_secret和client_id不写在项目里,为了安全考虑,运行前从github拷贝过来即可

运行前需要补充OauthConstants中的client_secretclient_id, 以及login.html中的client_id

运行示例

  1. 启动MyOauthDemoApplication
  2. 访问http://localhost:8080/login.html

参考资料