IdentityServer4 IdentityServer3.AccessTokenValidation

后端 未结 2 1679
太阳男子
太阳男子 2021-01-05 16:19

Happy new year to everyone...

I configured an IdentityServer4, and I can make successful ASP.net Core web api calls. But for asp.net framework 4.5.2 web apis, I got

2条回答
  •  生来不讨喜
    2021-01-05 17:01

    Remove the following line in the WebAPI accesstoken validation middleware.

    ValidationMode = ValidationMode.ValidationEndpoint
    

    The result should look like this:

    app.UseIdentityServerBearerTokenAuthentication(new IdentityServerBearerTokenAuthenticationOptions 
    {
         Authority = "http://www.abcdefgh.com:5000",
         RequiredScopes = new[] { "AuthorizationWebApiNETFramework" }
    });
    

提交回复
热议问题