• 大小: 2.43M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2020-12-25
  • 语言: C#
  • 标签: API  验证  asp.net  webapi  

资源简介


资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.IdentityModel.Tokens;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Security.Claims;
using System.Threading;
using System.Threading.Tasks;
using System.Web;

namespace DigestAuthentication
{
    public class AuthenticationHandler : DelegatingHandler
    {
        protected async override Task SendAsync(HttpRequestMessage request CancellationToken cancellationToken)
        {
            try
            {
                var headers = request.Headers;
                if (headers.Authorization != null)
                {
                    Header header = new Header(request.Headers.Authorization.Parameter
                       

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-07-05 15:36  DigestAuthentication\
     目录           0  2013-03-01 12:45  DigestAuthentication\App_Data\
     目录           0  2013-07-05 15:29  DigestAuthentication\App_Start\
     文件        2183  2012-11-14 17:42  DigestAuthentication\App_Start\BundleConfig.cs
     文件         286  2012-11-14 17:42  DigestAuthentication\App_Start\FilterConfig.cs
     文件         611  2012-11-14 17:42  DigestAuthentication\App_Start\RouteConfig.cs
     文件         561  2012-11-14 17:50  DigestAuthentication\App_Start\WebApiConfig.cs
     文件        3833  2013-03-14 14:43  DigestAuthentication\AuthenticationHandler.cs
     目录           0  2013-07-05 15:29  DigestAuthentication\bin\
     文件      105528  2012-11-14 16:55  DigestAuthentication\bin\Antlr3.Runtime.dll
     文件       19456  2013-03-23 17:11  DigestAuthentication\bin\DigestAuthentication.dll
     文件       34304  2013-03-23 17:11  DigestAuthentication\bin\DigestAuthentication.pdb
     文件     1116760  2012-11-14 16:54  DigestAuthentication\bin\Entityframework.dll
     文件     1138045  2012-11-14 16:54  DigestAuthentication\bin\Entityframework.xml
     文件       45416  2012-11-14 16:54  DigestAuthentication\bin\Microsoft.Web.Infrastructure.dll
     文件      374784  2012-11-14 16:54  DigestAuthentication\bin\Newtonsoft.Json.dll
     文件      418776  2012-11-14 16:54  DigestAuthentication\bin\Newtonsoft.Json.xml
     文件      168544  2012-11-14 16:55  DigestAuthentication\bin\System.Net.Http.Formatting.dll
     文件      137872  2012-11-14 16:55  DigestAuthentication\bin\System.Net.Http.Formatting.xml
     文件      138352  2012-11-14 16:54  DigestAuthentication\bin\System.Web.Helpers.dll
     文件       74208  2012-11-14 16:54  DigestAuthentication\bin\System.Web.Helpers.xml
     文件      323168  2012-11-14 16:55  DigestAuthentication\bin\System.Web.Http.dll
     文件       73312  2012-11-14 16:55  DigestAuthentication\bin\System.Web.Http.WebHost.dll
     文件       10071  2012-11-14 16:55  DigestAuthentication\bin\System.Web.Http.WebHost.xml
     文件      379561  2012-11-14 16:55  DigestAuthentication\bin\System.Web.Http.xml
     文件      506976  2012-11-14 16:55  DigestAuthentication\bin\System.Web.Mvc.dll
     文件      847872  2012-11-14 16:55  DigestAuthentication\bin\System.Web.Mvc.xml
     文件       54912  2012-11-14 16:55  DigestAuthentication\bin\System.Web.Optimization.dll
     文件      270416  2012-11-14 16:55  DigestAuthentication\bin\System.Web.Providers.dll
     文件      264792  2012-11-14 16:54  DigestAuthentication\bin\System.Web.Razor.dll
     文件      365160  2012-11-14 16:54  DigestAuthentication\bin\System.Web.Razor.xml
............此处省略138个文件信息

评论

共有 条评论