久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

升級到 5.0.0 后,TokenValidationParameters 不再工作

TokenValidationParameters no longer working after upgrade to 5.0.0(升級到 5.0.0 后,TokenValidationParameters 不再工作)
本文介紹了升級到 5.0.0 后,TokenValidationParameters 不再工作的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

限時送ChatGPT賬號..

我有以下代碼在我使用時可以正常工作System.IdentityModel.Tokens.Jwt,版本=4.0.20622.1351

I have the following code which was working when I was using System.IdentityModel.Tokens.Jwt, Version=4.0.20622.1351

private static void ConfigureAzureAD(IAppBuilder appBuilder)
{
    appBuilder.UseWindowsAzureActiveDirectoryBearerAuthentication(
        new WindowsAzureActiveDirectoryBearerAuthenticationOptions
        {
            Tenant = ConfigurationManager.AppSettings["ida:Tenant"],
            TokenValidationParameters = new System.IdentityModel.Tokens.TokenValidationParameters
            {
                ValidAudience = ConfigurationManager.AppSettings["ida:Audience"]
            }
        });
}

但是,一旦我將此包升級到最新的 版本 5它不再編譯抱怨對類型TokenValidationParameters"的引用聲稱它在 System.IdentityModel.Token.Jwt 中定義,但找不到.

However as soon as I upgraded this package to the latest one which is version 5 it no longer compiles complaining Reference to type 'TokenValidationParameters' claims it is defined in System.IdentityModel.Token.Jwt but it could not be found.

此外,如果您嘗試以下編譯器,則會警告您 Audience 已過時:

Also if you try the following compiler will warn you that Audience is obsolete:

 private static void ConfigureAzureAD(IAppBuilder appBuilder)
    {
        appBuilder.UseWindowsAzureActiveDirectoryBearerAuthentication(
            new WindowsAzureActiveDirectoryBearerAuthenticationOptions
            {
                Tenant = ConfigurationManager.AppSettings["ida:Tenant"],
                Audience = ConfigurationManager.AppSettings["ida:Audience"]
            });
    }

我再次降級了這個 DLL 并使用了 4.0.20622.1351 版本,它開始編譯.

I downgraded this DLL again and used the version 4.0.20622.1351, it started compiling.

配置 Azure Active Directory 的語法是否發生了變化?

Has there been a syntax change for Configuring the Azure Active Directory?

在 Github 上,我找不到使用最新包 5.0.0 的單個項目,并且所有項目都使用以前的包 4.0.20622.1351.任何人都可以使用最新的 System.IdentityModel.Tokens.Jwt 5.0.0 對此有所了解,或者使用最新的軟件包將我引導到 Github 上的某個項目嗎?

On Github I could not find a single project using the latest package 5.0.0 and all of them are using the previous package 4.0.20622.1351. Can anyone shed some light on this using the latest System.IdentityModel.Tokens.Jwt 5.0.0 or direct me to some project on Github using the latest package?

推薦答案

TokenValidationParameters 在匯編中:Microsoft.IdentityModel.Tokens

TokenValidationParameters is in assembly: Microsoft.IdentityModel.Tokens

看起來您正在使用 Katana(asp.net OWIN 產品的第一個版本).Katana 不支持 5.0.0.您需要堅持使用 4.x.

It looks like you are using Katana (the first version of asp.net OWIN offering). Katana does not support 5.0.0. You need to stick with 4.x.

最新版本的 asp.net 依賴于 S.IM.xx 和 M.IM.xxx 5.0.https://github.com/aspnet

The latest version of asp.net takes a dependency on S.IM.xx and M.IM.xxx 5.0. https://github.com/aspnet

這篇關于升級到 5.0.0 后,TokenValidationParameters 不再工作的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

ASP.NET Core authenticating with Azure Active Directory and persisting custom Claims across requests(ASP.NET Core 使用 Azure Active Directory 進行身份驗證并跨請求保留自定義聲明)
ASP.NET Core 2.0 Web API Azure Ad v2 Token Authorization not working(ASP.NET Core 2.0 Web API Azure Ad v2 令牌授權不起作用)
ASP Core Azure Active Directory Login use roles(ASP Core Azure Active Directory 登錄使用角色)
How do I get Azure AD OAuth2 Access Token and Refresh token for Daemon or Server to C# ASP.NET Web API(如何獲取守護進程或服務器到 C# ASP.NET Web API 的 Azure AD OAuth2 訪問令牌和刷新令牌) - IT屋-程序員軟件開發技
.Net Core 2.0 - Get AAD access token to use with Microsoft Graph(.Net Core 2.0 - 獲取 AAD 訪問令牌以與 Microsoft Graph 一起使用)
Azure KeyVault Active Directory AcquireTokenAsync timeout when called asynchronously(異步調用時 Azure KeyVault Active Directory AcquireTokenAsync 超時)
主站蜘蛛池模板: 亚洲精品欧美 | 成人在线精品 | 欧美日韩黄色一级片 | 久久一区二区三区四区 | 国产精品日韩欧美一区二区三区 | 国产91久久精品一区二区 | 久久国产精品久久国产精品 | 日韩国产欧美一区 | 日本色综合 | 亚洲欧美激情视频 | 成人午夜视频在线观看 | 久艹网站 | 国产aa| 日韩精品在线一区二区 | 亚洲福利av | 精品国产乱码久久久久久图片 | 久久大陆 | 毛片a级 | 欧美1—12sexvideos | 日韩成人久久 | 欧美一区视频 | 久久成人av电影 | 精品亚洲永久免费精品 | 精品久久久久久 | 视频一区二区在线观看 | 成人在线免费观看视频 | 97人人澡人人爽91综合色 | 中文字幕丁香5月 | 91在线网 | 成人妇女免费播放久久久 | 国产精品色哟哟网站 | 美女在线国产 | 欧美中文在线 | 精品一区二区三区在线观看国产 | 青青草一区二区 | 国产在视频一区二区三区吞精 | 99热电影| 精品国产乱码一区二区三区a | 天天草天天干 | 欧美中文在线 | 欧美中文字幕一区二区三区亚洲 |