Giter Club home page Giter Club logo

identityserver4testserver's People

Contributors

devdigital avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

identityserver4testserver's Issues

How to do micro service integration test

Hi @devdigital
I am now contribute a web service which combine mvcclient and identity server.
But I can't do test with two server. for example:
Used httpclient sent request to the client, then client request token from idserver.
My sample code reference this issue:
IdentityServer/IdentityServer4#2861
which use two customize WebApplicationFactory.
The Author of identity server tell me that I can using your project to do that. But I don't know how to do this.Because your sample code in the readme show the client is not match my mvcclient project.

Referenced production asp.net core 2.2 project throw exception by create the IdentityServer4TestServerFactory

My Idserver Project:
1
2

Then I create the xunit prject and reference the IdServer Project rebuild log:

1>------ Rebuild All started: Project: Identity.API, Configuration: Debug Any CPU ------
1>Identity.API -> E:\TFSWorkspace\WorkspaceForIdServer\OpenIdAspNetIdentityAuthorize\Services\Identity\Identity.API\bin\Debug\netcoreapp2.2\Identity.API.dll
1>Identity.API -> E:\TFSWorkspace\WorkspaceForIdServer\OpenIdAspNetIdentityAuthorize\Services\Identity\Identity.API\bin\Debug\netcoreapp2.2\Identity.API.Views.dll
2>------ Rebuild All started: Project: Identity.IntegrationTest, Configuration: Debug Any CPU ------
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3277: Found conflicts between different versions of "Microsoft.AspNetCore.Authentication.Abstractions" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3277: Found conflicts between different versions of "Microsoft.AspNetCore.Authorization" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3277: Found conflicts between different versions of "Microsoft.AspNetCore.Hosting" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3277: Found conflicts between different versions of "Microsoft.AspNetCore.Hosting.Abstractions" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3277: Found conflicts between different versions of "Microsoft.AspNetCore.Http.Abstractions" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3277: Found conflicts between different versions of "Microsoft.AspNetCore.Identity" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3277: Found conflicts between different versions of "Microsoft.AspNetCore.Mvc" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3277: Found conflicts between different versions of "Microsoft.AspNetCore.Mvc.Abstractions" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3277: Found conflicts between different versions of "Microsoft.AspNetCore.Mvc.Core" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3277: Found conflicts between different versions of "Microsoft.AspNetCore.Mvc.RazorPages" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3277: Found conflicts between different versions of "Microsoft.AspNetCore.Mvc.ViewFeatures" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3277: Found conflicts between different versions of "Microsoft.AspNetCore.Razor.Runtime" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3277: Found conflicts between different versions of "Microsoft.AspNetCore.Routing" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3277: Found conflicts between different versions of "Microsoft.EntityFrameworkCore" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3277: Found conflicts between different versions of "Microsoft.EntityFrameworkCore.Relational" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3277: Found conflicts between different versions of "Microsoft.Extensions.Configuration.Abstractions" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3277: Found conflicts between different versions of "Microsoft.Extensions.Identity.Core" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3277: Found conflicts between different versions of "Microsoft.Extensions.Logging.Abstractions" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3277: Found conflicts between different versions of "Microsoft.Extensions.Options" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
2>Identity.IntegrationTest -> E:\TFSWorkspace\WorkspaceForIdServer\OpenIdAspNetIdentityAuthorize\Services\Identity\Identity.IntegrationTest\bin\Debug\netcoreapp2.2\Identity.IntegrationTest.dll
2>Done building project "Identity.IntegrationTest.csproj".
========== Rebuild All: 2 succeeded, 0 failed, 0 skipped ==========

Debug test :
3

Extra examples/samples?

I think it would be really helpful to have some extra sample projects.

For example, it would be nice to have a simple API (as seen here) and then show how IdentityServer4TestServer can be used, maybe along side WebApplicationFactory?

A lot of us will be using WebApplicationFactory already, overriding stuff like ConfigureServices as seen here. So, examples would help people like me move over to this.

I really just want to be able to have my protected API use the IdentityServer4TestServer as the authority so I can easily create clients with tokens to test my different endpoints using different scopes/claims.

Make IdentityServer4TestServerFactory.GetWebHostBuilder() public (or protected)

Nice lib!

Could you consider making IdentityServer4TestServerFactory.GetWebHostBuilder() public or protected? I like the fluent config interface you have here I'd like to use it to build a test server that I can bind to a real listener instead of aspnet core's TestServer (the scenario is a 'DevServer' the runs multiple listeners - IdSrv and my app, amongst others).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.