基于Shiro, JWT实现微信小程序登录完整例子-源码

上传者: 38726007 | 上传时间: 2021-09-28 13:16:10 | 文件大小: 77KB | 文件类型: ZIP
微信小程序登录完整实现例子(基于Shiro,JWT) 微信小程序登陆流程图说明 : 上图是小程序登陆的官方流程图说明,官方地址 : 如果有对官方说明不清楚的地方,也可参看我的博客 : 本文博客链接 : 主要实现: 实现了小程序的自定义登陆,将自定义登陆态token返回给小程序作为登陆凭证。用户的信息保存在数据库中,登陆态token缓存在redis中。 首先从我们的小程序端调用wx.login() ,获取临时凭证code : 模拟使用该code,进行小程序的登陆获取自定义登陆态 token,用postman进行测试 : 调用我们需要认证的接口,并携带该token进行鉴权,获取到返回信息 : 使用运行本例的前提注意以下几点 : 本例是一个基于Shiro和JWT实现自定义登陆态的完整例子,你需要了解的技术栈 : Shiro,JWT,SpringBoot,JPA,Redis 已有小程序的ap

文件下载

资源详情

[{"title":"( 30 个子文件 77KB ) 基于Shiro, JWT实现微信小程序登录完整例子-源码","children":[{"title":"shiro-jwt-applet-master","children":[{"title":"mvnw.cmd <span style='color:#111;'> 5.67KB </span>","children":null,"spread":false},{"title":"mvnw <span style='color:#111;'> 8.90KB </span>","children":null,"spread":false},{"title":"src","children":[{"title":"test","children":[{"title":"java","children":[{"title":"name","children":[{"title":"ealen","children":[{"title":"ShiroTest.java <span style='color:#111;'> 497B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"main","children":[{"title":"resources","children":[{"title":"application.yml <span style='color:#111;'> 614B </span>","children":null,"spread":false}],"spread":true},{"title":"java","children":[{"title":"name","children":[{"title":"ealen","children":[{"title":"domain","children":[{"title":"service","children":[{"title":"WxAccountService.java <span style='color:#111;'> 3.61KB </span>","children":null,"spread":false}],"spread":true},{"title":"entity","children":[{"title":"WxAccount.java <span style='color:#111;'> 740B </span>","children":null,"spread":false}],"spread":true},{"title":"repository","children":[{"title":"WxAccountRepository.java <span style='color:#111;'> 382B </span>","children":null,"spread":false}],"spread":true},{"title":"vo","children":[{"title":"Code2SessionResponse.java <span style='color:#111;'> 482B </span>","children":null,"spread":false},{"title":"JwtToken.java <span style='color:#111;'> 540B </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"ShiroJwtAppletApplication.java <span style='color:#111;'> 382B </span>","children":null,"spread":false},{"title":"interfaces","children":[{"title":"dto","children":[{"title":"TokenDTO.java <span style='color:#111;'> 249B </span>","children":null,"spread":false},{"title":"CodeDTO.java <span style='color:#111;'> 271B </span>","children":null,"spread":false}],"spread":true},{"title":"facade","children":[{"title":"WxAppletController.java <span style='color:#111;'> 1.41KB </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"application","children":[{"title":"WxAppletService.java <span style='color:#111;'> 1.00KB </span>","children":null,"spread":false}],"spread":true},{"title":"infrastructure","children":[{"title":"exception","children":[{"title":"ControllerInterceptor.java <span style='color:#111;'> 3.59KB </span>","children":null,"spread":false},{"title":"model","children":[{"title":"ExceptionResponse.java <span style='color:#111;'> 1.20KB </span>","children":null,"spread":false}],"spread":false},{"title":"ControllerExceptionAdvice.java <span style='color:#111;'> 4.41KB </span>","children":null,"spread":false}],"spread":false},{"title":"util","children":[{"title":"JSONUtil.java <span style='color:#111;'> 608B </span>","children":null,"spread":false},{"title":"HttpUtil.java <span style='color:#111;'> 1.63KB </span>","children":null,"spread":false}],"spread":false},{"title":"config","children":[{"title":"RestTemplateConfig.java <span style='color:#111;'> 1.02KB </span>","children":null,"spread":false},{"title":"shiro","children":[{"title":"ShirConfig.java <span style='color:#111;'> 3.89KB </span>","children":null,"spread":false},{"title":"ShiroRealmConfig.java <span style='color:#111;'> 3.55KB </span>","children":null,"spread":false}],"spread":false},{"title":"jwt","children":[{"title":"JwtFilter.java <span style='color:#111;'> 2.49KB </span>","children":null,"spread":false},{"title":"JwtConfig.java <span style='color:#111;'> 4.17KB </span>","children":null,"spread":false}],"spread":false},{"title":"RedisConfig.java <span style='color:#111;'> 675B </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":".mvn","children":[{"title":"wrapper","children":[{"title":"maven-wrapper.jar <span style='color:#111;'> 47.20KB </span>","children":null,"spread":false},{"title":"maven-wrapper.properties <span style='color:#111;'> 116B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"pom.xml <span style='color:#111;'> 3.01KB </span>","children":null,"spread":false},{"title":".gitignore <span style='color:#111;'> 268B </span>","children":null,"spread":false},{"title":"readme.md <span style='color:#111;'> 3.20KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明