5.0.0 (2021-12-03)
- Fix spelling and rename
CreateWebHostBuidertoCreateWebHostBuilder. Thanks to pgermishuys
- Update IdentityServer4 to version
4.1.2 - Update IdentityModel to version
4.6.0 - Update Microsoft.AspNetCore.Mvc.Testing to version
3.1.21 - Update Microsoft.Extensions.Hosting to version
3.1.21 - Update Microsoft.Extensions.Logging to version
3.1.21
4.2.0 (2021-11-04)
Allow ApiResource and ApiScope to differ and only check that an ApiResource has corresponding ApiScope. Thanks to @gerrylowe! Closes #5
4.0.0 (2020-06-20)
- Support for
IdentityServer4version 4
4.0.0-rc.3 (2020-06-13)
- Support for
IdentityServer4version 4 preview 6
4.0.0-rc.2 (2020-05-22)
- Remove class
IdentityServerTestHostCustomContainerBuilderand add overload to build a host with custom service provider inIdentityServerTestHostBuilderclass
4.0.0-rc.1 (2020-05-21)
- Support for
IdentityServer4version 4 preview 5 - New class
IdentityServerTestHostCustomContainerBuilderwhich extendsIdentityServerTestHostBuilderand allows hooking in a third-party container while building the host. You can find anAutofacsample in the tests.
4.0.0-rc.0 (2020-05-10)
- Support for
IdentityServer4version 4 preview 3 - New class
IdentityServerTestHostBuilderwhich allows defining anIHostBuilder - New class
IdentityServerTestWebHostBuilderwhich contains the already defined logic ofIdentityServerHostBuilder - New class
IdentityServerHostProxywhich takes anIHostBuilderfor creation of theTestServer - New class
IdentityServerWebHostProxywhich contains the already defined logic ofIdentityServerProxy
- When defining an
ApiResourceaccordingApiScopeis required to be passed along. This is a breaking-change introduced through the update ofIdentityServer4to version 4. The according builder used validates that api-scopes are present when using api-resources. It will throw an exception if not. - For more details on the breaking changes of
IdentityServer4please check out the changelog ot it.
IdentityServerHostBuilderhas been marked as deprecated and will be removed with version 5. Please useIdentityServerTestHostBuilderorIdentityServerTestWebHostBuilderinsteadIdentityServerProxyhas been marked as deprecated and will be removed with version 5. Please useIdentityServerHostProxyorIdentityServerWebHostProxyinstead.
3.1.1 (2019-12-26)
- Update
IdentityServer4to version3.1.0
3.1.0 (2019-12-11)
- .NET Core 3.1 is now required
- Update dependencies to
3.1.0
3.0.2 (2019-11-12)
- Update
IdentityServer4to 3.0.2 - Update
IdentityModelto 4.1.0
3.0.1 (2019-09-25)
- Update
IdentityServer4to 3.0.1
3.0.0 (2019-09-23)
- .NET-Core 3 is now required.
IdentityServerWebHostBuilderhas been renamed toIdentityServerHostBuilder
- .NET-Core 3 support!
1.4.0 (2019-07-19)
- Update
IdentityServer4to version 2.5.0 - Update
IdentitxModelto version 3.10.10
1.3.0 (2019-05-05)
- Add constructor to
IdentityServerProxyto directly pass in aTestServer
1.2.0 (2019-04-09)
- Allow passing of an
IdentityServerOptionsBuilderto use custom options inIdentityServerWebHostBuilder - Allow passing of an
IdentityServerBuilderto use a custom builder inIdentityServerWebHostBuilder
- Update Identity.Model to 3.10.7
- Expose
TestServerfrom classIdentityServerProxyin order to be able to create a handler manually.
1.1.0 (2019-04-08)
- Expose
TestServerfrom classIdentityServerProxyin order to be able to create a handler manually.
1.0.0 (2019-04-08)
This is the inital release of the package. This release contains two mandatory classes
IdentityServerWebHostBuilderIdentityServerProxy
The IdentityServerWebHostBuilder class is a fluent-builder that contains the following functions
AddApiResources(params ApiResource[] apiResources)AddClients(params Client[] clients)AddIdentityResources(params IdentityResource[] identityResources)UseApplicationBuilder(Action<IApplicationBuilder> applicationBuilder)UseConfigurationBuilder( Action<WebHostBuilderContext, IConfigurationBuilder> configurationBuilder)UseServices( Action<WebHostBuilderContext, IServiceCollection> servicesBuilder)UseLoggingBuilder( Action<WebHostBuilderContext, ILoggingBuilder> loggingBuilder)UseResourceOwnerPasswordValidator(Type type)UseResourceOwnerPasswordValidator<TResourceOwnerPasswordValidator>( TResourceOwnerPasswordValidator resourceOwnerPasswordValidator) where TResourceOwnerPasswordValidator : class, IResourceOwnerPasswordValidatorUseProfileService(Type type)UseProfileService<TProfileService>( TProfileService profileService) where TProfileService : class, IProfileServiceCreateWebHostBuilder()UseWebHostBuilder(IWebHostBuilder webHostBuilder)
When calling CreateWebHostBuilder() a WebHostBuilder is created based on the configuration. With that builder we create the IdentityServerProxy.
The IndentityServerProxy, as the name says, serves as a proxy for IdentityServer4 and takes a WebHostBuilder as constructor parameter, then creates a TestServer from Microsoft.AspNetCore.Mvc.Testing
Following functions available
GetDiscoverResponseAsync()GetTokenAsync(ClientConfiguration clientConfiguration, string grantType, IDictionary<string, string> parameters)GetClientAccessTokenAsync(ClientConfiguration clientConfiguration, params string[] scopes)GetClientAccessTokenAsync(ClientConfiguration clientConfiguration, IDictionary<string, string> parameters, params string[] scopes)GetResourceOwnerPasswordAccessTokenAsync( ClientConfiguration clientConfiguration, UserLoginConfiguration userLoginConfiguration, params string[] scopes)GetResourceOwnerPasswordAccessTokenAsync( ClientConfiguration clientConfiguration, UserLoginConfiguration userLoginConfiguration, Dictionary<string, string> parameters)GetRefreshTokenAsync(ClientConfiguration clientConfiguration, string refreshToken, params string[] scopes)GetRefreshTokenAsync(ClientConfiguration clientConfiguration, string refreshToken, IDictionary<string, string> parameters)GetUserInfoAsync(string accessToken)