identityserver3

Identity Server and web api for user management

余生长醉 提交于 2019-12-03 13:41:15
I'm using Identity Server3 for my project, I currently have a website and api being protected by the Id server, this is working fine however because I'm storing the users in the Id Server database I can't really change any user's data from the website like changing the profile picture or any claim value. In order to solve this I'm thinking in creating an API on top of IdServer, this API will manage the users, changing a password, retrieving users or changing anything related to a user basically, I want to create this API on the sample project where I have my IdServer using Owin mapping. Right

How to add claims to access token get from IdentityServer3 using resource owner flow with javascript client

為{幸葍}努か 提交于 2019-12-03 10:38:49
问题 I use the resource owner flow with IdentityServer3 and send get token request to identity server token endpoint with username and password in javascript as below: function getToken() { var uid = document.getElementById("username").value; var pwd = document.getElementById("password").value; var xhr = new XMLHttpRequest(); xhr.onload = function (e) { console.log(xhr.status); console.log(xhr.response); var response_data = JSON.parse(xhr.response); if (xhr.status === 200 && response_data.access

Change default endpoint in IdentityServer 4

落花浮王杯 提交于 2019-12-03 08:56:37
I was working around IdentityServer 4 (1.0.0-beta5). By default, the endpoint for authentication is: '/connect/token' . How can I change the default endpoints in IdentityServer, for instance to: '/api/login'? Thanks Right now you cannot change the endpoint URLs of the protocol endpoints. If you think this is needed, please open an issue on github. Once you setup Identity Server 4 at Startup - you could use this "hack" and update the endpoint paths: var builder = services.AddIdentityServer() .AddDeveloperSigningCredential() .AddInMemoryApiResources(Config.GetApiResources()) .AddInMemoryClients

How to do multiple-step login in IdentityServer4?

爷,独闯天下 提交于 2019-12-03 08:41:42
We were using IdentityServer3, implicit grant and the login consists of multiple screen. In IdentityServer3, there's built in support for such multiple step login workflow (for example for accepting EULA, two-factor login, etc.), The feature called " partial login " and there is even an example: https://github.com/IdentityServer/IdentityServer3.Samples/tree/master/source/CustomUserService/CustomUserService We've recently upgraded to AspNetCore and IdentityServer4 and wondering how suppose to achieve the same? That is, check username and password in the first step, and if correct, store it

Enable Oauth2 client credentials flow in Swashbuckle

强颜欢笑 提交于 2019-12-03 05:54:28
Im using IdentityServer3 to secure a Web API with the client credentials grant. For documentation Im using Swashbuckle but can't figure out how to enable Oauth2 in the SwaggerConfig for the client credentials (application) flow. Any help would be appreciated! I was able to get this working. Most of the answer can be found here . There were a few parts I had to change to get the client_credential grant to work. The first part is in the EnableSwagger and EnableSwaggerUi calls: config.EnableSwagger(c => { c.SingleApiVersion("v1", "sample api"); c.OAuth2("oauth2") .Description("client credentials

How would I generate the Identity Server signing certificate

一笑奈何 提交于 2019-12-03 03:15:44
问题 In the identity server samples we find code like this in Startup.cs var certFile = env.ApplicationBasePath + "\\idsrv3test.pfx"; var signingCertificate = new X509Certificate2(certFile, "idsrv3test"); How would I go about replacing this for production scenarios? 回答1: Get a dedicated cert - either via your PKI or self-generate one: http://brockallen.com/2015/06/01/makecert-and-creating-ssl-or-signing-certificates/ Import the key pair into the Windows certificate store, and load it from there at

OWIN middleware for OpenID Connect - Code flow ( Flow type - AuthorizationCode) documentation?

懵懂的女人 提交于 2019-12-03 02:49:17
In my implementation I am using OpenID-Connect Server (Identity Server v3+) to authenticate Asp.net MVC 5 app (with AngularJS front-end) I am planning to use OID Code flow (with Scope Open_ID) to authenticate the client (RP). For the OpenID connect middle-ware, I am using OWIN (Katana Project) components. Before the implementation, I want to understand back-channel token request, refresh token request process, etc using OWIN.. But I am unable to find any documentation for this type of implementation (most of the available examples use Implicit flow). I could find samples for generic Code flow

asp.net web form client with identity server 4

孤人 提交于 2019-12-03 02:24:40
I have a asp.net solution which consists of 1). asp.net identity server rc 3 2). asp.net Core web api 3). asp.net webform ( not in asp.net core, client) I don't see any sample with identity server 4 and web form client. Can you please suggest how to authenticate web form user using identity server with asp.net identity and then call api with the access token ? I don't see identity server 4 sample with web form client or sample identity server 3 has a sample but it is doing everything in startup When i see mvc client for identity server 4, it has all settings in configure method and then calls

IdentityServer Flows

瘦欲@ 提交于 2019-12-03 01:09:50
问题 IdentityServer supports different OpenId Connect flows that are defined in the Flows enum and set for clients. There's also samples for each type of flow and many references to them in the docs but I could not find a simple definition list of what flows are in the documentation as if they are too obvious to explain in words. But I guess they're not. Can you please tell more about the differences of these, maybe we can add that to the docs? So what are: implicit flow, resource owner password

Convert a method to use async

谁说我不能喝 提交于 2019-12-02 16:53:40
问题 I am converting a authentication process to support async and the VS 2015 IDE is warning me with the following message: The async method lacks 'await' operators and will run synchronously... etc... Anyway, the code connects to a LDAP store and verifies a user's account and etc... I have tried various things with await, but I am just missing something here. I put the code back to what it was before.. I would appreciate any guidance in getting it to support async correctly... Here is the code: