Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hezhii/http-auth
https://github.com/hezhii/http-auth
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/hezhii/http-auth
- Owner: hezhii
- Created: 2018-04-01T15:15:41.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-15T02:54:56.000Z (almost 6 years ago)
- Last Synced: 2024-04-14T12:31:51.391Z (10 months ago)
- Language: JavaScript
- Size: 731 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# HTTP 身份认证
某些页面、数据、功能等只想让特定的人甚至本人访问,为了实现这个目标,那么必不可少的就是认证功能,例如:常见的输入用户名、密码的表单验证或者移动端的手机短信验证等。
HTTP 本身也提供了身份认证机制,包括:**基本认证**和**摘要认证**。
此仓库实现了服务端的基本认证和摘要认证。
## 如何测试
1. 克隆项目并安装依赖,服务端基于 Express 进行构建。
```bash
$ git clone https://github.com/hezhii/http-auth.git
$ cd http-auth
$ npm install
```2. 启动服务并通过浏览器页面测试
```bash
$ npm start
```3. 服务启动后,通过浏览器访问 http://localhost:8080 页面,点击 **BASIC 认证**测试基本认证,点击 **DIGEST 认证**测试摘要认证。
## 了解更多
关于 HTTP 认证机制的具体细节,可以访问[我的博客](blog.whezh.com/http-auth/)进行了解。