ASP.NET Web API and OpenID Connect: how to get Access Token from Authorization Code

前端 未结 3 431
你的背包
你的背包 2021-02-04 04:57

I try to get OpenID Connect running... A user of my Web API managed to get an Authorization Code of a OpenID Connect Provider. How am I supposed to pass this code to my ASP.NET

3条回答
  •  爱一瞬间的悲伤
    2021-02-04 05:20

    You need to bypass the default owin validation to do custom Authorization:

               new OpenIdConnectAuthenticationOptions
                {
                    ...,
                    TokenValidationParameters = new System.IdentityModel.Tokens.TokenValidationParameters
                    {
                        ValidateIssuer = false
                    },
    

提交回复
热议问题