openid-connect

Refresh tokens using owin middleware and IdentityServer v3

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-06 05:36:26
问题 I've recently setup IdentityServer v3 and its running like a dream, however I'm having troubles with the OWIN middleware. I would like to use the hybrid flow so I can refresh tokens in the backend without the user having to redirect back to the IdentityServer to get a new access token every 5 minutes (which is also odd as its set to have a lifetime of 1 hour on the server). I'm using the following config in startup and I'm getting the tokens fine, but it never seems to try and refresh the

Refresh tokens using owin middleware and IdentityServer v3

佐手、 提交于 2021-02-06 05:35:50
问题 I've recently setup IdentityServer v3 and its running like a dream, however I'm having troubles with the OWIN middleware. I would like to use the hybrid flow so I can refresh tokens in the backend without the user having to redirect back to the IdentityServer to get a new access token every 5 minutes (which is also odd as its set to have a lifetime of 1 hour on the server). I'm using the following config in startup and I'm getting the tokens fine, but it never seems to try and refresh the

How to call Identity Server 4 with Postman for login

北城余情 提交于 2021-02-05 20:26:40
问题 I've a solution in Visual Studio 'TourManagement' which contains 2 projects of .Net core. One is IDP using Identity Server 4, second project is RESTful API of TourManagement secured by IDP project. My question is how can i call Identity Server 4 using Postman to get tokens and call TourManagement Bands API by passing these tokens in header return from identity server in postman? My code is below. Startup Class in IDP Project using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore

Changing the domain name for AAD auth with openIdConnect for multi node multi geo applications

南楼画角 提交于 2021-02-05 09:40:23
问题 I am using Asp.Net Core 2.2 and targeting .NET Framework 4.7.2. Ours is a multi cluster, multi node app. We are using Azure AD with OpenId Connect for authenticating the user. Our Startup.cs looks like this : services.Configure<CookiePolicyOptions>(options => { // This lambda determines whether user consent for non-essential cookies is needed for a given request. options.CheckConsentNeeded = context => true; options.MinimumSameSitePolicy = SameSiteMode.None; }); services.AddAuthentication

Changing the domain name for AAD auth with openIdConnect for multi node multi geo applications

a 夏天 提交于 2021-02-05 09:36:27
问题 I am using Asp.Net Core 2.2 and targeting .NET Framework 4.7.2. Ours is a multi cluster, multi node app. We are using Azure AD with OpenId Connect for authenticating the user. Our Startup.cs looks like this : services.Configure<CookiePolicyOptions>(options => { // This lambda determines whether user consent for non-essential cookies is needed for a given request. options.CheckConsentNeeded = context => true; options.MinimumSameSitePolicy = SameSiteMode.None; }); services.AddAuthentication

Changing the domain name for AAD auth with openIdConnect for multi node multi geo applications

北城余情 提交于 2021-02-05 09:36:12
问题 I am using Asp.Net Core 2.2 and targeting .NET Framework 4.7.2. Ours is a multi cluster, multi node app. We are using Azure AD with OpenId Connect for authenticating the user. Our Startup.cs looks like this : services.Configure<CookiePolicyOptions>(options => { // This lambda determines whether user consent for non-essential cookies is needed for a given request. options.CheckConsentNeeded = context => true; options.MinimumSameSitePolicy = SameSiteMode.None; }); services.AddAuthentication

How to disable ssl certificate validation upon OpenId connect in .Net Core 3.1?

只谈情不闲聊 提交于 2021-02-05 09:01:52
问题 I'm trying to connect in a development environment to a open id authority with it's ip address. Obviously in this scenario the ssl validation will fail. I'd like to bypass it, without any luck so far. I've found the following answers regarding this topic: Setting the RequireHttpsMetadata to false in the OpenIdConnectOptions class. Using the code below: ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true; When my app tries to access the

Myaccount and Console apps in WSO2IS-5.11.0 are not working when the server started with port offset

拜拜、爱过 提交于 2021-02-04 07:47:10
问题 Changing the port by changing the offset in the deployment.toml or using -DportOffset doesn't get applied to the Console and the My Account applications. How to reproduce: Change the offset by adding the following config to the deployment.toml [server] offset=2 Start the server Access the console app from https://localhost:9445/console Access the my account app from https://localhost:9445/myaccount Following error is displayed. Observed, that the reason is that the callback URL is not changed

OIDC Register & Auto-login Flow for Mobile Apps

不羁岁月 提交于 2021-02-02 03:45:47
问题 How is one meant to implement a registration flow for Mobile Apps which use Identityserver 4 as the IDP? My setup is as follows: Mobile App (Xamarin Native + IdentityModel.OidcClient) Identity Server 4 (OIDC Identity Provider) API (Secured by Identity Server JWT Token + Register endpoint which creates a user in the IDSRV4 DB) What I would like to achieve is this: User is shown a register screen within the mobile app (NOT in-app browser) Mobile app makes a request to the Register API endpoint

How to dynamically change OpenID configuration based on something in a single ASP.NET Core application?

青春壹個敷衍的年華 提交于 2021-01-29 10:02:27
问题 We have some OpenID configuration specified in ConfigureServices in Startup.cs : services.AddOpenIdConnect("something", "Something", options => { // ... // }); How can we change the configuration we've outlined here dynamically, on a per request basis, based on certain rules? Can this be done in a middleware? If so, please give an example, thank you! 回答1: Don't think you can do that, but you can if you want add multiple services.AddOpenIdConnect(...) handlers and use a different one for