"按页面分类的接口设计:登录与注册接口详解"
需积分: 0 100 浏览量
更新于2024-02-01
收藏 615KB PDF 举报
ording to the interface design classified by page (request URL, input, output), the login page interface is designed with the following specifications:
URL: /account/login
Request Method: POST
Request Parameters:
- u_id: Student ID/Employee Number/Administrator Number (String, required)
- password: Password (String, required, encrypted with MD5)
Return Parameters:
- code:
* 200: Login successful
* 208: User ID does not exist
* 209: Incorrect password (Integer)
- message:
* 200: token with user information
* 208: "User ID does not exist"
* 209: "Incorrect password" (String)
Additional Notes: When making requests to APIs other than /api/login, /api/register, and /api/searchId, the pbl_token must be carried in the header for identity verification. If the user's login status exceeds two hours, the token will become invalid. The token is designed as follows: u_id_millisecond_password_Last5ofMD5 (e.g., 12345_5000_AB2DC)
Additionally, there is a user object serialized into a JSON string, containing properties such as u_id, type, u_name, gender, and description. When the code is 200, the image URL is carried, otherwise it is null.
With these specifications in place, the registration page interface is also defined with the following details:
URL: /acc
Request Method: POST
Request Parameters:
- u_id: Student ID (Integer, required)
In conclusion, the interface design classified by page provides clear guidelines for the request URL, input, and output for the login and registration pages. It involves the essential parameters such as user ID, password, and token for authentication and security purposes. This detailed design ensures the smooth operation and secure authentication of the system.
2022-08-08 上传
2022-08-03 上传
2020-10-18 上传
2008-10-31 上传
2008-04-30 上传
2021-03-10 上传
点击了解资源详情
点击了解资源详情
love彤彤
- 粉丝: 728
- 资源: 310
最新资源
- R语言中workflows包的建模工作流程解析
- Vue统计工具项目配置与开发指南
- 基于Spearman相关性的协同过滤推荐引擎分析
- Git基础教程:掌握版本控制精髓
- RISCBoy: 探索开源便携游戏机的设计与实现
- iOS截图功能案例:TKImageView源码分析
- knowhow-shell: 基于脚本自动化作业的完整tty解释器
- 2011版Flash幻灯片管理系统:多格式图片支持
- Khuli-Hawa计划:城市空气质量与噪音水平记录
- D3-charts:轻松定制笛卡尔图表与动态更新功能
- 红酒品质数据集深度分析与应用
- BlueUtils: 经典蓝牙操作全流程封装库的介绍
- Typeout:简化文本到HTML的转换工具介绍与使用
- LeetCode动态规划面试题494解法精讲
- Android开发中RxJava与Retrofit的网络请求封装实践
- React-Webpack沙箱环境搭建与配置指南