identityserver4

I can't access my logged in user in my Data Access Layer - Identity server 4 and .NET 4.7.1

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-05 05:30:43
问题 I have an API that uses Identity Server 4 for User Authentication based on JWT Bearer Access Token. Now when I Pass in the access_token in my request header I can view the User Details in the User Object in the Controller. But if I try to access the System.Security.Claims.ClaimsPrincipal in my DAL it is different to my logged in user. This is how I configured Authentication for Identity Server 4 in my Web Project Startup.cs In ConfigureServices - services.AddAuthentication("Bearer")

After logout when validating access_token in Introspection endpoint is returning active

倖福魔咒の 提交于 2020-01-04 07:37:04
问题 I am having problems validating if the token is active, when I call the endpoint of instrospection it returns active true even leaving the application. It only returns false after the access_token lifetime expires. Steps below. I login in the application is generated access_token, refresh_token and etc. Perform the application logoff by the endsession endpoint When executing the instrospection endpoint passing the previously retrieved access_token the system returns that it is active Question

HTTPS communication in ServiceFabric Local Cluster

自古美人都是妖i 提交于 2020-01-04 04:07:09
问题 Here's my setup an IdentityServer 4 as a stateless reliable ASP.NET Core service. a WebAPI as a reliable ASP.NET Core service. using them with a JS client, it is now working with HTTP. The problem is with HTTPS. The WebAPI needs to request the openID config via htttps [is4URL].well-known/openid-configuration. I'm getting this error System.InvalidOperationException: IDX10803: Unable to obtain configuration from: 'https://localhost:9999/.well-known/openid-configuration'. ---> System.IO

Getting Scopes and Clients from Database instead of InMemoryClients & InMemoryScopes Identity Server 3

可紊 提交于 2020-01-04 01:06:20
问题 I want to read Scopes and Clients from database instead of InMemoryClients & InMemoryScopes in Identity Server 3. Any one please help me how to read how we can achieve this in identity server 3. Thanks in advance. 回答1: From the docs (https://identityserver.github.io/Documentation/docsv2/ef/overview.html): If scope or client data is desired to be loaded from a database (rather than use in-memory configuration), then we provide a Entity Framework based implementations of the IClientStore and

Identity server registration doesn't redirect back to React app

偶尔善良 提交于 2020-01-03 16:46:53
问题 I have an ASP.NET Core backend with a React frontend hosted in different origins. The ASP.NET core backend is configured to use the inbuilt identity server: // Startup public void ConfigureServices(IServiceCollection services) { ... services.AddIdentityServer() .AddApiAuthorization<ApplicationUser, ApplicationDbContext>(); ... } I have added the OidcConfigurationController that the identity server expects: public class OidcConfigurationController : Controller { public

How to disabling SSL for identityserver4

限于喜欢 提交于 2020-01-02 22:07:20
问题 I need to disable SSL/TSL for IdentityServer4 in DotNet Core 2 for test purpose. I have seen this link : disabling SSL for identityserver3 but I need it in version 4. 回答1: With the clue from @Hbert Jarema I was able to find it in the documentation: services.AddAuthentication() .AddOpenIdConnect(options => { options.RequireHttpsMetadata = false; }); 回答2: Set RequireHttpsMetadata to false in AddIdentityServerAuthentication like this: .AddIdentityServerAuthentication(options => { options

How to disabling SSL for identityserver4

耗尽温柔 提交于 2020-01-02 22:06:35
问题 I need to disable SSL/TSL for IdentityServer4 in DotNet Core 2 for test purpose. I have seen this link : disabling SSL for identityserver3 but I need it in version 4. 回答1: With the clue from @Hbert Jarema I was able to find it in the documentation: services.AddAuthentication() .AddOpenIdConnect(options => { options.RequireHttpsMetadata = false; }); 回答2: Set RequireHttpsMetadata to false in AddIdentityServerAuthentication like this: .AddIdentityServerAuthentication(options => { options

Identity Server 4/nativescript Hangs

吃可爱长大的小学妹 提交于 2020-01-02 01:57:47
问题 I have the following client: new Client { ClientId = "nativeapptest", ClientName = "Native App Test", Enabled = true, RequireClientSecret = false, AllowedGrantTypes = GrantTypes.Code, RedirectUris = { "com.mysite.nativeapp.12365789785256-buv2dwer7jjjjv5fckasdftn367psbrlb:/home" }, AllowedScopes = { IdentityServerConstants.StandardScopes.OpenId, IdentityServerConstants.StandardScopes.Profile, "MyScope" }, RequirePkce = false, AllowOfflineAccess = true, RequireConsent = false } I am using

Identity Server 4 Auto Login After Registration

陌路散爱 提交于 2020-01-01 17:11:46
问题 I want the user to be auto logged after registration to the MVC app (email verification is not needed now), I have followed this sample for IdSrv3 and edited some parts: http://benfoster.io/blog/identity-server-post-registration-sign-in Here is my Setup: MVC: public class AuthController : Controller { [HttpGet] [AllowAnonymous] public async Task LogIn() { var properties = new AuthenticationProperties { RedirectUri = Url.Action("index", "home", HttpContext.Request.GetUri().Scheme) }; await

Identity Server 4 Auto Login After Registration

主宰稳场 提交于 2020-01-01 17:11:22
问题 I want the user to be auto logged after registration to the MVC app (email verification is not needed now), I have followed this sample for IdSrv3 and edited some parts: http://benfoster.io/blog/identity-server-post-registration-sign-in Here is my Setup: MVC: public class AuthController : Controller { [HttpGet] [AllowAnonymous] public async Task LogIn() { var properties = new AuthenticationProperties { RedirectUri = Url.Action("index", "home", HttpContext.Request.GetUri().Scheme) }; await