openiddict

Hosting ASOS with TestServer

不想你离开。 提交于 2019-12-10 09:44:15
问题 I have an OpenIdDict authentication server which is based on AspNet.Security.OpenIdConnect.Server . The setup works as expected. Now to do some in process integration;system tests which span the whole backend architecture I use the TestServer class. Why I test like this is another question Most test code coverage with least amount of work It has been decided to not do unit tests... (too much work they say) Real integration tests which span much less code where also seen as to much work when I

OpenIddict - How do you obtain the access token for a user?

爷,独闯天下 提交于 2019-12-08 06:45:47
问题 I am working on a sample application for OpenIddict using AngularJs. I was told that you shouldnt use clientside frameworks like Satellizer, as this isnt recommended, but instead allow the server to deal with logging in server side (locally and using external login providers), and return the access token. Well i have a demo angularJs application and uses server side login logic and calls back to the angular app, but my problem is, how do i get the access token for the current user? here is my

How can I add custom claims to be returned when requesting a token using OpenIddict?

百般思念 提交于 2019-12-08 03:05:59
问题 I'm building ASP.NET Core 1.1 app (cross platform) and trying (using this sample) to add custom claims to the returned access_token when requesting /connect/token endpoint. What I need is to not only return the claims serialized in the access_token but to return them in the response like this: { "token_type": "Bearer", "access_token": "...", "expires_in": 1799, "custom_claim": "..." } What I found on internet that I have to use AspNet.Security.OpenIdConnect.Server and write my provider in

OpenIddict - How do you obtain the access token for a user?

孤街浪徒 提交于 2019-12-06 14:49:06
I am working on a sample application for OpenIddict using AngularJs. I was told that you shouldnt use clientside frameworks like Satellizer, as this isnt recommended, but instead allow the server to deal with logging in server side (locally and using external login providers), and return the access token. Well i have a demo angularJs application and uses server side login logic and calls back to the angular app, but my problem is, how do i get the access token for the current user? here is my startup.cs file, so you can see my configuration so far public void ConfigureServices

How can I add custom claims to be returned when requesting a token using OpenIddict?

蹲街弑〆低调 提交于 2019-12-06 14:32:08
I'm building ASP.NET Core 1.1 app (cross platform) and trying (using this sample ) to add custom claims to the returned access_token when requesting /connect/token endpoint. What I need is to not only return the claims serialized in the access_token but to return them in the response like this: { "token_type": "Bearer", "access_token": "...", "expires_in": 1799, "custom_claim": "..." } What I found on internet that I have to use AspNet.Security.OpenIdConnect.Server and write my provider in order to be able to do what I want. Isn't there a simple way using the first sample ? I'm using OAUth 2.0

ASP.NET Core Openiddict throws “An OpenID Connect response cannot be returned from this endpoint”

非 Y 不嫁゛ 提交于 2019-12-06 09:20:29
I follow instruction in openiddict server example using password flow from https://github.com/openiddict/openiddict-samples/tree/master/samples/PasswordFlow but have no success. It throws InvalidOperationException: An OpenID Connect response cannot be returned from this endpoint at route /connect/token : return SignIn(ticket.Principal, ticket.Properties, ticket.AuthenticationScheme); Postman params: Content-Type: application/x-www-form-urlencoded Params: username=..&password=...&grantType=password&scope=offline_access+profile+email I spent my day for researching but there is no information

The type or namespace name 'OpenIddictDbContext<,,>' could not be found

血红的双手。 提交于 2019-12-06 05:12:13
问题 I have a problem. I opened my project this morning and got the error: The type or namespace name 'OpenIddictDbContext<,,>' could not be found (are you missing a using directive or an assembly reference?) [netcoreapp1.1] This error occurred when I restored and built my project. It's strange because I do have "OpenIddict": "1.0.0-*" , in my project.json file and I am using the reference: using OpenIddict ; This issue causes problems everywhere in my project because he doesn't seem to recognise

Hosting ASOS with TestServer

一个人想着一个人 提交于 2019-12-05 21:40:49
I have an OpenIdDict authentication server which is based on AspNet.Security.OpenIdConnect.Server . The setup works as expected. Now to do some in process integration;system tests which span the whole backend architecture I use the TestServer class. Why I test like this is another question Most test code coverage with least amount of work It has been decided to not do unit tests... (too much work they say) Real integration tests which span much less code where also seen as to much work when I want to achieve a good coverage The test are based on an framework that is build using a domain

The type or namespace name 'OpenIddictDbContext<,,>' could not be found

廉价感情. 提交于 2019-12-04 10:47:15
I have a problem. I opened my project this morning and got the error: The type or namespace name 'OpenIddictDbContext<,,>' could not be found (are you missing a using directive or an assembly reference?) [netcoreapp1.1] This error occurred when I restored and built my project. It's strange because I do have "OpenIddict": "1.0.0-*" , in my project.json file and I am using the reference: using OpenIddict ; This issue causes problems everywhere in my project because he doesn't seem to recognise "using OpenIddict" If it helps, this is an example where I got the error (ApplicationDbContext.cs)

SignalR and OpenId Connect

岁酱吖の 提交于 2019-12-04 05:00:59
问题 I have a server which uses ASP.NET Core Web Api and OpenIddict as authorization framework. Now I've added an SignalR host and want to add authorisation to it. From different sources I found that SignalR (JS Client) wants that you send the access token in the querystring or by cookie as websockets don't support headers. As the authentication middleware doesn't check the querystring or cookie container for an authorization entry I need to implement such an provider/retriever/resolver which