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

升級(jí)到 5.0.0 后,TokenValidationParameters 不再工作

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

問(wèn)題描述

限時(shí)送ChatGPT賬號(hào)..

我有以下代碼在我使用時(shí)可以正常工作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"]
            }
        });
}

但是,一旦我將此包升級(jí)到最新的 版本 5它不再編譯抱怨對(duì)類型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.

此外,如果您嘗試以下編譯器,則會(huì)警告您 Audience 已過(guò)時(shí):

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"]
            });
    }

我再次降級(jí)了這個(gè) DLL 并使用了 4.0.20622.1351 版本,它開(kāi)始編譯.

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

配置 Azure Active Directory 的語(yǔ)法是否發(fā)生了變化?

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

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

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

看起來(lái)您正在使用 Katana(asp.net OWIN 產(chǎn)品的第一個(gè)版本).Katana 不支持 5.0.0.您需要堅(jiān)持使用 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

這篇關(guān)于升級(jí)到 5.0.0 后,TokenValidationParameters 不再工作的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

相關(guān)文檔推薦

ASP.NET Core authenticating with Azure Active Directory and persisting custom Claims across requests(ASP.NET Core 使用 Azure Active Directory 進(jìn)行身份驗(yàn)證并跨請(qǐng)求保留自定義聲明)
ASP.NET Core 2.0 Web API Azure Ad v2 Token Authorization not working(ASP.NET Core 2.0 Web API Azure Ad v2 令牌授權(quán)不起作用)
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(如何獲取守護(hù)進(jìn)程或服務(wù)器到 C# ASP.NET Web API 的 Azure AD OAuth2 訪問(wèn)令牌和刷新令牌) - IT屋-程序員軟件開(kāi)發(fā)技
.Net Core 2.0 - Get AAD access token to use with Microsoft Graph(.Net Core 2.0 - 獲取 AAD 訪問(wèn)令牌以與 Microsoft Graph 一起使用)
Azure KeyVault Active Directory AcquireTokenAsync timeout when called asynchronously(異步調(diào)用時(shí) Azure KeyVault Active Directory AcquireTokenAsync 超時(shí))
主站蜘蛛池模板: 国内精品视频免费观看 | 亚洲精品一区二区三区蜜桃久 | 午夜视频在线视频 | 久久久久久高潮国产精品视 | 特级丰满少妇一级aaaa爱毛片 | 午夜一区二区三区在线观看 | 一区二区三区国产精品 | 日韩精品极品视频在线观看免费 | 国产成人精品一区二区三区四区 | 日本精品999| 久久久91 | a免费视频 | 毛片一区 | 亚洲一区二区三区在线视频 | 午夜精品久久久久久不卡欧美一级 | 日韩精品成人在线 | 最新国产福利在线 | 欧美日韩国产一区二区三区 | 国产免费福利小视频 | 国产精品欧美精品日韩精品 | 亚洲最大成人综合 | 一级黄色片日本 | 成人h动漫精品一区二区器材 | 精品国产亚洲一区二区三区大结局 | 国产精品久久久久久婷婷天堂 | 夜夜夜久久久 | 2021狠狠干 | 色欧美片视频在线观看 | 久久久日韩精品一区二区三区 | 亚洲成人av在线 | 色婷婷综合久久久中字幕精品久久 | 久久精品成人 | 日本欧美国产在线观看 | 免费在线看黄视频 | 国产乱码久久久久久一区二区 | av一区二区三区四区 | 亚洲一区二区精品 | 国产成人综合在线 | 久久成人高清视频 | 欧美成人激情 | 美国a级毛片免费视频 |