5.0.0 (2021-12-03)
- Fix spelling and rename
CreateWebHostBuider
toCreateWebHostBuilder
. 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
IdentityServer4
version 4
4.0.0-rc.3 (2020-06-13)
- Support for
IdentityServer4
version 4 preview 6
4.0.0-rc.2 (2020-05-22)
- Remove class
IdentityServerTestHostCustomContainerBuilder
and add overload to build a host with custom service provider inIdentityServerTestHostBuilder
class
4.0.0-rc.1 (2020-05-21)
- Support for
IdentityServer4
version 4 preview 5 - New class
IdentityServerTestHostCustomContainerBuilder
which extendsIdentityServerTestHostBuilder
and allows hooking in a third-party container while building the host. You can find anAutofac
sample in the tests.
4.0.0-rc.0 (2020-05-10)
- Support for
IdentityServer4
version 4 preview 3 - New class
IdentityServerTestHostBuilder
which allows defining anIHostBuilder
- New class
IdentityServerTestWebHostBuilder
which contains the already defined logic ofIdentityServerHostBuilder
- New class
IdentityServerHostProxy
which takes anIHostBuilder
for creation of theTestServer
- New class
IdentityServerWebHostProxy
which contains the already defined logic ofIdentityServerProxy
- When defining an
ApiResource
accordingApiScope
is required to be passed along. This is a breaking-change introduced through the update ofIdentityServer4
to 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
IdentityServer4
please check out the changelog ot it.
IdentityServerHostBuilder
has been marked as deprecated and will be removed with version 5. Please useIdentityServerTestHostBuilder
orIdentityServerTestWebHostBuilder
insteadIdentityServerProxy
has been marked as deprecated and will be removed with version 5. Please useIdentityServerHostProxy
orIdentityServerWebHostProxy
instead.
3.1.1 (2019-12-26)
- Update
IdentityServer4
to 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
IdentityServer4
to 3.0.2 - Update
IdentityModel
to 4.1.0
3.0.1 (2019-09-25)
- Update
IdentityServer4
to 3.0.1
3.0.0 (2019-09-23)
- .NET-Core 3 is now required.
IdentityServerWebHostBuilder
has been renamed toIdentityServerHostBuilder
- .NET-Core 3 support!
1.4.0 (2019-07-19)
- Update
IdentityServer4
to version 2.5.0 - Update
IdentitxModel
to version 3.10.10
1.3.0 (2019-05-05)
- Add constructor to
IdentityServerProxy
to directly pass in aTestServer
1.2.0 (2019-04-09)
- Allow passing of an
IdentityServerOptionsBuilder
to use custom options inIdentityServerWebHostBuilder
- Allow passing of an
IdentityServerBuilder
to use a custom builder inIdentityServerWebHostBuilder
- Update Identity.Model to 3.10.7
- Expose
TestServer
from classIdentityServerProxy
in order to be able to create a handler manually.
1.1.0 (2019-04-08)
- Expose
TestServer
from classIdentityServerProxy
in 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
IdentityServerWebHostBuilder
IdentityServerProxy
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, IResourceOwnerPasswordValidator
UseProfileService(Type type)
UseProfileService<TProfileService>( TProfileService profileService) where TProfileService : class, IProfileService
CreateWebHostBuilder()
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)