• 首页
  • 期刊简介
  • 编委会
  • 投稿指南
  • 收录情况
  • 杂志订阅
  • 联系我们
引用本文:胡献宇.基于令牌认证方案的改进研究与实践[J].软件工程,2021,24(4):34-38.【点击复制】
【打印本页】   【下载PDF全文】   【查看/发表评论】  【下载PDF阅读器】  
←前一篇|后一篇→ 过刊浏览
分享到: 微信 更多
基于令牌认证方案的改进研究与实践
胡献宇
(大连东软信息学院,辽宁 大连 116023)
huxianyu@neusoft.edu.cn
摘 要: 就前后端分离的软件开发模式而言,保护后端数据接口不被非法调用是十分重要的。令牌作为获取保护资源的凭证,需要提供过期时间,否则认证功能就失去了意义。针对活跃用户,需要在有效时间内提供自动登录功能,可以提升使用体验。本文研究了OAuth(Open Authorization,一种开放的授权标准)的认证机制,并在ASP.NET Web API框架基础上,实现身份认证方案,当访问令牌过期后,增加令牌刷新机制,既能够改善用户体验,也能够有效保护数据接口。该方案具有通用性,适用于前后端分离的软件开发。通过测试,表明了该方案具有有效性和可行性。
关键词: OAuth;身份验证和授权;前后端分离;刷新
中图分类号: TP311.11    文献标识码: A
Research and Practice of Improving Token Authentication Scheme
HU Xianyu
(Dalian Neusoft University of Information, Dalian 116023, China)
huxianyu@neusoft.edu.cn
Abstract: For software development model that separates front and back ends, it is very important to protect backend data interface from being illegally invoked. The token, as a voucher for obtaining protected resources, needs to provide an expiration time, otherwise authentication function will lose its meaning. For active users, automatic login function needs to be provided within valid time to improve user experience. This paper proposes to implement an identity authentication scheme based on the ASP.NET Web API framework after studying an authentication mechanism of OAuth (Open Authorization, an open authorization standard). When the access token expires, token refresh mechanism is added, which can not only improve user experience, but also effectively protect data interfaces. The proposed scheme is versatile and suitable for software development with separation of front and back ends. Tests show its effectiveness and feasibility.
Keywords: OAuth; authentication and authorization; separation of front and back ends; refresh


版权所有:软件工程杂志社
地址:辽宁省沈阳市浑南区新秀街2号 邮政编码:110179
电话:0411-84767887 传真:0411-84835089 Email:semagazine@neusoft.edu.cn
备案号:辽ICP备17007376号-1
技术支持:北京勤云科技发展有限公司

用微信扫一扫

用微信扫一扫