- 51Aspx源码必读.txt[2KB]
- from.jpg[11KB]
- TokenAuthMVC.sln[1KB]
- 最新Asp.Net源码下载.url[123B]
源码介绍
源码参数
一、源码描述
MVC4的Auth验证案例
环境:VS2022
二、功能介绍
Welcome!
This is a demo of token-based authentication for a C# ASP .NET MVC web service.
Try the following steps:
Click 'Search' without logging in. Notice, you'll get an HTTP 401 error (unauthenticated). Check out the Chrome/Firefox network panel in the debugger for proof.
Click 'Login'. Notice, a token key is generated in memory, yet never sent to the server. The key is safely on your own PC.
Click 'Search'. This time, the API call succeeds and data is displayed.
Open the Chrome/Firefox network panel in the debugger. Click 'Search' a few more times. Notice that each time you click 'Search' a new token is generated and sent to the server.
Click 'Logout'. The token key is deleted from memory.
请为我翻译以上信息
这是一个关于 C# ASP .NET MVC Web 服务中基于令牌的身份验证的演示。
尝试以下步骤:
在没有登录的情况下点击 'Search'(搜索)。请注意,您会收到一个 HTTP 401 错误(未通过身份验证)。在调试器中查看 Chrome 或 Firefox 的网络面板以验证这一点。
点击 'Login'(登录)。请注意,会在内存中生成一个令牌密钥,但它从未发送到服务器。该密钥安全地保存在您的电脑上。
再次点击 'Search'(搜索)。这一次,API 调用成功,并且数据显示出来了。
打开 Chrome 或 Firefox 调试器中的网络面板。再点击几次 'Search'(搜索)。请注意,每次点击 'Search'(搜索)都会生成一个新的令牌并发送给服务器。
点击 'Logout'(登出)。令牌密钥将从内存中删除。
三、注意事项
ctrl+F5运行即可。
下载记录(Only Recent 100)
用户名 | 推荐指数 | 下载时间 |
---|---|---|
kir** | 未推荐 | 2018-03-28 06:43:01 |
qie** | 未推荐 | 2018-02-27 14:30:31 |
flx** | 未推荐 | 2017-12-29 14:21:30 |
lia** | 未推荐 | 2017-11-27 23:07:50 |