openid-connect

How to use ConfigurationManager? (Microsoft.IdentityModel.Protocols)

不羁岁月 提交于 2020-05-12 18:42:46
问题 I was recently forced to update my System.IdentityModel.Tokens.Jwt NuGet package to 5.1.4 because of another NuGet package. Most of the code after changes seem easy enough to solve, but now ConfigurationManager<OpenIdConnectConfiguration>() takes two arguments instead of one! I can not find any example of how to use this new version of the Configuration manager! I use it as part of this code: string stsDiscoveryEndpoint = string.Format("{0}/.well-known/openid-configuration", authority);

How to use ConfigurationManager? (Microsoft.IdentityModel.Protocols)

允我心安 提交于 2020-05-12 18:38:39
问题 I was recently forced to update my System.IdentityModel.Tokens.Jwt NuGet package to 5.1.4 because of another NuGet package. Most of the code after changes seem easy enough to solve, but now ConfigurationManager<OpenIdConnectConfiguration>() takes two arguments instead of one! I can not find any example of how to use this new version of the Configuration manager! I use it as part of this code: string stsDiscoveryEndpoint = string.Format("{0}/.well-known/openid-configuration", authority);

How to use ConfigurationManager? (Microsoft.IdentityModel.Protocols)

。_饼干妹妹 提交于 2020-05-12 18:29:58
问题 I was recently forced to update my System.IdentityModel.Tokens.Jwt NuGet package to 5.1.4 because of another NuGet package. Most of the code after changes seem easy enough to solve, but now ConfigurationManager<OpenIdConnectConfiguration>() takes two arguments instead of one! I can not find any example of how to use this new version of the Configuration manager! I use it as part of this code: string stsDiscoveryEndpoint = string.Format("{0}/.well-known/openid-configuration", authority);

How to do Silent Refresh manually in implicit flow using iFrame (using Identity Server 4, Angular 2+)

浪子不回头ぞ 提交于 2020-04-17 22:16:50
问题 I am trying to do silent refresh using iFrame with Implicit Flow. I do not want to use automaticSilentRenew as it is not efficient. I am using oidc-client library in Angular 8 on the client side. So, there are two things which are happening : 1.) I am using auth-guard to secure the important components. In auth-guard i am checking if the token is valid, in case it's not then i am calling signinRedirect of the auth-service class to fetch the new token. 2.) I am not guarding the secure API

Asp.net UseOpenIdConnectAuthentication not working in Azure

若如初见. 提交于 2020-04-17 05:44:31
问题 I am using UseOpenIdConnectAuthentication to authenticate users. My application code works fine locally. But, when I run it on Azure, the SecurityTokenValidated event is never fired. Consequently, the code runs fine but the user is never authenticated. I am not sure if the issue is with my code or with Azure. This is being used in a Web Form, Asp.net application (not Core). I use the Azure trace feature to log. I can see that only "RedirectToIdentityProvider" is fired. No other event gets

Asp.net UseOpenIdConnectAuthentication not working in Azure

北城余情 提交于 2020-04-17 05:43:36
问题 I am using UseOpenIdConnectAuthentication to authenticate users. My application code works fine locally. But, when I run it on Azure, the SecurityTokenValidated event is never fired. Consequently, the code runs fine but the user is never authenticated. I am not sure if the issue is with my code or with Azure. This is being used in a Web Form, Asp.net application (not Core). I use the Azure trace feature to log. I can see that only "RedirectToIdentityProvider" is fired. No other event gets

OpenID redirect vs bearer

廉价感情. 提交于 2020-04-16 08:22:08
问题 I'm developing a microservice in C++ (for low latency reasons), and I'm beginning to dive into OpenID and Keycloak. Developing in C++ means I've almost no library support for OpenID, but I've (hopefully) the all the low level details working (like proper JWT verification). I've to do all the communication flows and redirects myself. So much as a background. Keep that in mind because I need to know and implement details which usually a library will hide for a developer. There are three parties

How to Validate OpenID Connect Access Token generated by Azure AD v2 in ASP.NET core WEB API?

五迷三道 提交于 2020-04-14 09:05:11
问题 How to Validate OpenID Connect Access Token generated by Azure AD (v2!!!) in ASP.NET core WEB API? The Scenario is: I have an Angular 8 Client Application which is getting an OpenID Connect access Token after Login. The Client can call the API along with the Access Token. But Question is, How should I validate that Token in ASP.NET core API? With this code I get an Authorize Error without any descriptions. services.AddAuthentication(AzureADDefaults.BearerAuthenticationScheme)

Azure AD Open ID Connect OAuth 2.0 in ASP.NET Web APP and Web API Infinite redirect loop

余生颓废 提交于 2020-04-02 09:38:13
问题 ASP.NET web app to sign in personal accounts and work and school accounts from any Azure Active Directory (Azure AD) instance. OWIN middleware NuGet packages Install-Package Microsoft.Owin.Security.OpenIdConnect Install-Package Microsoft.Owin.Security.Cookies Install-Package Microsoft.Owin.Host.SystemWeb OWIN Startup Class The OWIN middleware uses a startup class that runs when the hosting process initializes. In this quickstart, the startup.cs file located in the root folder. The following

Upgrading IdentityServer4 to Core 3.1 - tokens are suddenly not signed correctly?

。_饼干妹妹 提交于 2020-02-26 04:03:07
问题 We encountered an error while upgrading IdentityServer4 (2.5.3 - 3.1.0) to Core 3.1 (from 2.2). Suddenly tokens that are issued doesn't have the correct signature. We haven't changed the signing algorithm; still using the same .PFX-certificate between versions. var idSrvBuilder = services.AddIdentityServer(opts => { opts.Events.RaiseErrorEvents = true; opts.Events.RaiseFailureEvents = true; opts.Events.RaiseInformationEvents = true; opts.Events.RaiseSuccessEvents = true; if (_env.IsProduction