identityserver4

Exchange reference token for JWT - downstream microservices authorization

痴心易碎 提交于 2021-02-07 09:20:30
问题 I am currently creating a new application based on a Microservices architecture, with authentication provided by Identity Server 4. Following lots of research and also setting up proof of concepts, I have Identity Server setup to secure the API's and a native application successfully accessing these services using tokens. Initially the client was issued an access token which was used to access the API's, I have however now switched this out to use reference tokens. Now, onto the issue! The

Exchange reference token for JWT - downstream microservices authorization

試著忘記壹切 提交于 2021-02-07 09:20:21
问题 I am currently creating a new application based on a Microservices architecture, with authentication provided by Identity Server 4. Following lots of research and also setting up proof of concepts, I have Identity Server setup to secure the API's and a native application successfully accessing these services using tokens. Initially the client was issued an access token which was used to access the API's, I have however now switched this out to use reference tokens. Now, onto the issue! The

ASP.NET Core 3.0 Identity Server 4 (4.0.0) SecurityTokenInvalidAudienceException: IDX10214: Audience validation failed. Audiences: 'empty'

断了今生、忘了曾经 提交于 2021-02-07 08:22:04
问题 I keep getting the following error between postman and IdentityServer 4 Microsoft.IdentityModel.Tokens.SecurityTokenInvalidAudienceException: IDX10214: Audience validation failed. Audiences: 'empty'. Did not match: validationParameters.ValidAudience: 'MyNumberV2Api' or validationParameters.ValidAudiences: 'null'. at Microsoft.IdentityModel.Tokens.Validators.ValidateAudience(IEnumerable`1 audiences, SecurityToken securityToken, TokenValidationParameters validationParameters) at System

Authentication against local AD in the Angular application

扶醉桌前 提交于 2021-02-07 08:20:27
问题 I've been developing an Angular app with .NET Core backend (services). The task is to enable an integrated authentication, i.e. make it work with the local user seamlessly, so I login to my (connected to a local AD) machine once and the web application lets me in without the necessity to login a second time. We've been working with Identity Server 4 and intended to implement this scenario using it. There is a little documentation on the official website concerning the Windows Authentication

Authentication against local AD in the Angular application

 ̄綄美尐妖づ 提交于 2021-02-07 08:18:02
问题 I've been developing an Angular app with .NET Core backend (services). The task is to enable an integrated authentication, i.e. make it work with the local user seamlessly, so I login to my (connected to a local AD) machine once and the web application lets me in without the necessity to login a second time. We've been working with Identity Server 4 and intended to implement this scenario using it. There is a little documentation on the official website concerning the Windows Authentication

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

How to create a signing certificate and use it in IdentityServer4 in production?

拈花ヽ惹草 提交于 2021-02-05 13:15:43
问题 Most (all?) the sample code on the IdentityServer4 docs site uses AddDeveloperSigningCredential() , but recommends using AddSigningCredential() instead in production. I spent more hours than I care to think about trying to figure out how to do that. How do I create a signing certificate and use it in IdentityServer4 in production? 回答1: Create certificate and add to machine's certificate store I decided to create a certificate and add it to the machine's certificate store. Brock Allen has a

ASP.NET Core authorization permission access folder with Identity Server

允我心安 提交于 2021-02-05 09:35:44
问题 In my ASP.NET Core project, I have the integration with Identity Server. So, users have to login in Identity Server and then they have access to the application. The design department gave me some static page in HTML5 to publish but only authenticated people or with a specific role can see those pages. I thought to use the old web.config to protect this folder like <location path="subdir1"> <system.web> <authorization> <allow users ="*" /> </authorization> </system.web> </location> but it

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

Log out user when idle using IdentityServer4 + oidc-client-js in Angular

做~自己de王妃 提交于 2021-01-29 18:43:46
问题 On my application I have a timeout feature so when the user is idle for X minutes I want to sign out from Identity Server. My first attempt was to manually create the call without having the user to navigate to the Logout controller. This code looks like this (Angular + TS): this.userManager .createSignoutRequest({ id_token_hint: this.user && this.user.id_token }) .then(signout_request => { this.http .get(signout_request.url, { responseType: 'text', headers: new HttpHeaders().set