Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.0.0-rc3 #703

Merged
merged 22 commits into from
Sep 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
3461793
add missing await for async method
b0 Aug 13, 2020
c8816b1
Merge pull request #680 from b0/await-async-method
skoruba Aug 13, 2020
2e64190
Update AccountController.cs
Walid-Abdulrazik Sep 10, 2020
51f8c45
Merge pull request #1 from Walid-Abdulrazik/Walid-Abdulrazik-patch-1
Walid-Abdulrazik Sep 10, 2020
9ea406f
Fix RegisterWithoutUsername view localization Bug
Walid-Abdulrazik Sep 10, 2020
be75f24
Merge pull request #700 from Walid-Abdulrazik/Walid-Abdulrazik-patch-2
skoruba Sep 12, 2020
e2c896b
Added bootstrap-datepicker.es to gulpfile (#691)
zinkpad Sep 12, 2020
c8b9a2d
Update publish-docker-images.ps1
skoruba Sep 12, 2020
ba1783e
Merge branch 'dev' of https://github.com/skoruba/IdentityServer4.Admi…
skoruba Sep 12, 2020
2c852ba
Add missing localicalization for bootstrap-datepicker
skoruba Sep 12, 2020
0357ef4
Update scripts
skoruba Sep 12, 2020
b24c845
Add fix for #689
skoruba Sep 12, 2020
c8b7368
Add AutoSaveChanges virtual #684
skoruba Sep 12, 2020
ab6d30f
Disable reset password through Email if you have setup RequireUniqueE…
skoruba Sep 12, 2020
3e7f811
Fix #678
skoruba Sep 12, 2020
dc3e717
Fix missing mapping for UserProvider
skoruba Sep 12, 2020
7a964a0
Update to version 1.0.0-rc3
skoruba Sep 12, 2020
479a26b
Update to RC3
skoruba Sep 12, 2020
da732de
Update README.md
skoruba Sep 12, 2020
f14e6dc
Update dotnet new template to RC3
skoruba Sep 12, 2020
a3e9c30
Merge branch 'dev' of https://github.com/skoruba/IdentityServer4.Admi…
skoruba Sep 12, 2020
a3f8b6e
Revert sln
skoruba Sep 12, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The application is written in the **Asp.Net Core MVC - using .NET Core 3.1**
- Install the dotnet new template:

```sh
dotnet new -i Skoruba.IdentityServer4.Admin.Templates::1.0.0-rc2-update1
dotnet new -i Skoruba.IdentityServer4.Admin.Templates::1.0.0-rc3
```

- Create new project:
Expand Down Expand Up @@ -161,11 +161,11 @@ docker-compose up -d
### Docker images
- Docker images will be available also in [docker hub](https://hub.docker.com/u/skoruba)
- AdminUI:
- `skoruba/identityserver4-admin:rc2`
- `skoruba/identityserver4-admin:rc3`
- Admin Api:
- `skoruba/identityserver4-admin-api:rc2`
- `skoruba/identityserver4-admin-api:rc3`
- STS:
- `skoruba/identityserver4-sts-identity:rc2`
- `skoruba/identityserver4-sts-identity:rc3`

### Publish Docker images to Docker hub
- Check the script in `build/publish-docker-images.ps1` - change the profile name according to your requirements.
Expand Down
14 changes: 8 additions & 6 deletions build/publish-docker-images.ps1
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
param([string] $version)

# build docker images according to docker-compose
docker-compose build

# rename images with following tag
docker tag skoruba-identityserver4-admin skoruba/identityserver4-admin:rc1
docker tag skoruba-identityserver4-sts-identity skoruba/identityserver4-sts-identity:rc1
docker tag skoruba-identityserver4-admin-api skoruba/identityserver4-admin-api:rc1
docker tag skoruba-identityserver4-admin skoruba/identityserver4-admin:$version
docker tag skoruba-identityserver4-sts-identity skoruba/identityserver4-sts-identity:$version
docker tag skoruba-identityserver4-admin-api skoruba/identityserver4-admin-api:$version

# push to docker hub
docker push skoruba/identityserver4-admin:rc1
docker push skoruba/identityserver4-admin-api:rc1
docker push skoruba/identityserver4-sts-identity:rc1
docker push skoruba/identityserver4-admin:$version
docker push skoruba/identityserver4-admin-api:$version
docker push skoruba/identityserver4-sts-identity:$version
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Skoruba.IdentityServer4.Admin.Api.Configuration.ApplicationParts
{
public class GenericTypeControllerFeatureProvider<TUserDto, TRoleDto, TUser, TRole, TKey, TUserClaim, TUserRole, TUserLogin, TRoleClaim, TUserToken,
TUsersDto, TRolesDto, TUserRolesDto, TUserClaimsDto,
TUserProviderDto, TUserProvidersDto, TUserChangePasswordDto, TRoleClaimsDto, TUserClaimDto> : IApplicationFeatureProvider<ControllerFeature>
TUserProviderDto, TUserProvidersDto, TUserChangePasswordDto, TRoleClaimsDto, TUserClaimDto, TRoleClaimDto> : IApplicationFeatureProvider<ControllerFeature>
where TUserDto : UserDto<TKey>, new()
where TRoleDto : RoleDto<TKey>, new()
where TUser : IdentityUser<TKey>
Expand All @@ -30,16 +30,17 @@ public class GenericTypeControllerFeatureProvider<TUserDto, TRoleDto, TUser, TRo
where TUserRolesDto : UserRolesDto<TRoleDto, TKey>
where TUserClaimsDto : UserClaimsDto<TUserClaimDto, TKey>
where TUserProviderDto : UserProviderDto<TKey>
where TUserProvidersDto : UserProvidersDto<TKey>
where TUserProvidersDto : UserProvidersDto<TUserProviderDto, TKey>
where TUserChangePasswordDto : UserChangePasswordDto<TKey>
where TRoleClaimsDto : RoleClaimsDto<TKey>
where TRoleClaimsDto : RoleClaimsDto<TRoleClaimDto, TKey>
where TUserClaimDto : UserClaimDto<TKey>
where TRoleClaimDto : RoleClaimDto<TKey>
{
public void PopulateFeature(IEnumerable<ApplicationPart> parts, ControllerFeature feature)
{
var currentAssembly = typeof(GenericTypeControllerFeatureProvider<TUserDto, TRoleDto, TUser, TRole, TKey, TUserClaim, TUserRole, TUserLogin, TRoleClaim, TUserToken,
TUsersDto, TRolesDto, TUserRolesDto, TUserClaimsDto,
TUserProviderDto, TUserProvidersDto, TUserChangePasswordDto, TRoleClaimsDto, TUserClaimDto>).Assembly;
TUserProviderDto, TUserProvidersDto, TUserChangePasswordDto, TRoleClaimsDto, TUserClaimDto, TRoleClaimDto>).Assembly;
var controllerTypes = currentAssembly.GetExportedTypes()
.Where(t => typeof(ControllerBase).IsAssignableFrom(t) && t.IsGenericTypeDefinition)
.Select(t => t.GetTypeInfo());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace Skoruba.IdentityServer4.Admin.Api.Controllers
[Authorize(Policy = AuthorizationConsts.AdministrationPolicy)]
public class RolesController<TUserDto, TRoleDto, TUser, TRole, TKey, TUserClaim, TUserRole, TUserLogin, TRoleClaim, TUserToken,
TUsersDto, TRolesDto, TUserRolesDto, TUserClaimsDto,
TUserProviderDto, TUserProvidersDto, TUserChangePasswordDto, TRoleClaimsDto, TUserClaimDto> : ControllerBase
TUserProviderDto, TUserProvidersDto, TUserChangePasswordDto, TRoleClaimsDto, TUserClaimDto, TRoleClaimDto> : ControllerBase
where TUserDto : UserDto<TKey>, new()
where TRoleDto : RoleDto<TKey>, new()
where TUser : IdentityUser<TKey>
Expand All @@ -39,27 +39,28 @@ public class RolesController<TUserDto, TRoleDto, TUser, TRole, TKey, TUserClaim,
where TUserRolesDto : UserRolesDto<TRoleDto, TKey>
where TUserClaimsDto : UserClaimsDto<TUserClaimDto, TKey>, new()
where TUserProviderDto : UserProviderDto<TKey>
where TUserProvidersDto : UserProvidersDto<TKey>
where TUserProvidersDto : UserProvidersDto<TUserProviderDto, TKey>
where TUserChangePasswordDto : UserChangePasswordDto<TKey>
where TRoleClaimsDto : RoleClaimsDto<TKey>, new()
where TRoleClaimsDto : RoleClaimsDto<TRoleClaimDto, TKey>, new()
where TUserClaimDto : UserClaimDto<TKey>
where TRoleClaimDto : RoleClaimDto<TKey>
{
private readonly IIdentityService<TUserDto, TRoleDto, TUser, TRole, TKey, TUserClaim, TUserRole, TUserLogin, TRoleClaim, TUserToken,
TUsersDto, TRolesDto, TUserRolesDto, TUserClaimsDto,
TUserProviderDto, TUserProvidersDto, TUserChangePasswordDto, TRoleClaimsDto, TUserClaimDto> _identityService;
TUserProviderDto, TUserProvidersDto, TUserChangePasswordDto, TRoleClaimsDto, TUserClaimDto, TRoleClaimDto> _identityService;
private readonly IGenericControllerLocalizer<UsersController<TUserDto, TRoleDto, TUser, TRole, TKey, TUserClaim, TUserRole, TUserLogin, TRoleClaim, TUserToken,
TUsersDto, TRolesDto, TUserRolesDto, TUserClaimsDto,
TUserProviderDto, TUserProvidersDto, TUserChangePasswordDto, TRoleClaimsDto, TUserClaimDto>> _localizer;
TUserProviderDto, TUserProvidersDto, TUserChangePasswordDto, TRoleClaimsDto, TUserClaimDto, TRoleClaimDto>> _localizer;

private readonly IMapper _mapper;
private readonly IApiErrorResources _errorResources;

public RolesController(IIdentityService<TUserDto, TRoleDto, TUser, TRole, TKey, TUserClaim, TUserRole, TUserLogin, TRoleClaim, TUserToken,
TUsersDto, TRolesDto, TUserRolesDto, TUserClaimsDto,
TUserProviderDto, TUserProvidersDto, TUserChangePasswordDto, TRoleClaimsDto, TUserClaimDto> identityService,
TUserProviderDto, TUserProvidersDto, TUserChangePasswordDto, TRoleClaimsDto, TUserClaimDto, TRoleClaimDto> identityService,
IGenericControllerLocalizer<UsersController<TUserDto, TRoleDto, TUser, TRole, TKey, TUserClaim, TUserRole, TUserLogin, TRoleClaim, TUserToken,
TUsersDto, TRolesDto, TUserRolesDto, TUserClaimsDto,
TUserProviderDto, TUserProvidersDto, TUserChangePasswordDto, TRoleClaimsDto, TUserClaimDto>> localizer, IMapper mapper, IApiErrorResources errorResources)
TUserProviderDto, TUserProvidersDto, TUserChangePasswordDto, TRoleClaimsDto, TUserClaimDto, TRoleClaimDto>> localizer, IMapper mapper, IApiErrorResources errorResources)
{
_identityService = identityService;
_localizer = localizer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace Skoruba.IdentityServer4.Admin.Api.Controllers
[Authorize(Policy = AuthorizationConsts.AdministrationPolicy)]
public class UsersController<TUserDto, TRoleDto, TUser, TRole, TKey, TUserClaim, TUserRole, TUserLogin, TRoleClaim, TUserToken,
TUsersDto, TRolesDto, TUserRolesDto, TUserClaimsDto,
TUserProviderDto, TUserProvidersDto, TUserChangePasswordDto, TRoleClaimsDto, TUserClaimDto> : ControllerBase
TUserProviderDto, TUserProvidersDto, TUserChangePasswordDto, TRoleClaimsDto, TUserClaimDto, TRoleClaimDto> : ControllerBase
where TUserDto : UserDto<TKey>, new()
where TRoleDto : RoleDto<TKey>, new()
where TUser : IdentityUser<TKey>
Expand All @@ -42,27 +42,28 @@ public class UsersController<TUserDto, TRoleDto, TUser, TRole, TKey, TUserClaim,
where TUserRolesDto : UserRolesDto<TRoleDto, TKey>
where TUserClaimsDto : UserClaimsDto<TUserClaimDto, TKey>, new()
where TUserProviderDto : UserProviderDto<TKey>
where TUserProvidersDto : UserProvidersDto<TKey>
where TUserProvidersDto : UserProvidersDto<TUserProviderDto, TKey>
where TUserChangePasswordDto : UserChangePasswordDto<TKey>
where TRoleClaimsDto : RoleClaimsDto<TKey>
where TRoleClaimsDto : RoleClaimsDto<TRoleClaimDto, TKey>
where TUserClaimDto : UserClaimDto<TKey>
where TRoleClaimDto : RoleClaimDto<TKey>
{
private readonly IIdentityService<TUserDto, TRoleDto, TUser, TRole, TKey, TUserClaim, TUserRole, TUserLogin, TRoleClaim, TUserToken,
TUsersDto, TRolesDto, TUserRolesDto, TUserClaimsDto,
TUserProviderDto, TUserProvidersDto, TUserChangePasswordDto, TRoleClaimsDto, TUserClaimDto> _identityService;
TUserProviderDto, TUserProvidersDto, TUserChangePasswordDto, TRoleClaimsDto, TUserClaimDto, TRoleClaimDto> _identityService;
private readonly IGenericControllerLocalizer<UsersController<TUserDto, TRoleDto, TUser, TRole, TKey, TUserClaim, TUserRole, TUserLogin, TRoleClaim, TUserToken,
TUsersDto, TRolesDto, TUserRolesDto, TUserClaimsDto,
TUserProviderDto, TUserProvidersDto, TUserChangePasswordDto, TRoleClaimsDto, TUserClaimDto>> _localizer;
TUserProviderDto, TUserProvidersDto, TUserChangePasswordDto, TRoleClaimsDto, TUserClaimDto, TRoleClaimDto>> _localizer;

private readonly IMapper _mapper;
private readonly IApiErrorResources _errorResources;

public UsersController(IIdentityService<TUserDto, TRoleDto, TUser, TRole, TKey, TUserClaim, TUserRole, TUserLogin, TRoleClaim, TUserToken,
TUsersDto, TRolesDto, TUserRolesDto, TUserClaimsDto,
TUserProviderDto, TUserProvidersDto, TUserChangePasswordDto, TRoleClaimsDto, TUserClaimDto> identityService,
TUserProviderDto, TUserProvidersDto, TUserChangePasswordDto, TRoleClaimsDto, TUserClaimDto, TRoleClaimDto> identityService,
IGenericControllerLocalizer<UsersController<TUserDto, TRoleDto, TUser, TRole, TKey, TUserClaim, TUserRole, TUserLogin, TRoleClaim, TUserToken,
TUsersDto, TRolesDto, TUserRolesDto, TUserClaimsDto,
TUserProviderDto, TUserProvidersDto, TUserChangePasswordDto, TRoleClaimsDto, TUserClaimDto>> localizer, IMapper mapper, IApiErrorResources errorResources)
TUserProviderDto, TUserProvidersDto, TUserChangePasswordDto, TRoleClaimsDto, TUserClaimDto, TRoleClaimDto>> localizer, IMapper mapper, IApiErrorResources errorResources)
{
_identityService = identityService;
_localizer = localizer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public static IServiceCollection AddAdminApiCors(this IServiceCollection service
public static void AddMvcServices<TUserDto, TRoleDto,
TUser, TRole, TKey, TUserClaim, TUserRole, TUserLogin, TRoleClaim, TUserToken,
TUsersDto, TRolesDto, TUserRolesDto, TUserClaimsDto,
TUserProviderDto, TUserProvidersDto, TUserChangePasswordDto, TRoleClaimsDto, TUserClaimDto>(
TUserProviderDto, TUserProvidersDto, TUserChangePasswordDto, TRoleClaimsDto, TUserClaimDto, TRoleClaimDto>(
this IServiceCollection services)
where TUserDto : UserDto<TKey>, new()
where TRoleDto : RoleDto<TKey>, new()
Expand All @@ -101,10 +101,11 @@ public static IServiceCollection AddAdminApiCors(this IServiceCollection service
where TUserRolesDto : UserRolesDto<TRoleDto, TKey>
where TUserClaimsDto : UserClaimsDto<TUserClaimDto, TKey>
where TUserProviderDto : UserProviderDto<TKey>
where TUserProvidersDto : UserProvidersDto<TKey>
where TUserProvidersDto : UserProvidersDto<TUserProviderDto, TKey>
where TUserChangePasswordDto : UserChangePasswordDto<TKey>
where TRoleClaimsDto : RoleClaimsDto<TKey>
where TRoleClaimsDto : RoleClaimsDto<TRoleClaimDto, TKey>
where TUserClaimDto : UserClaimDto<TKey>
where TRoleClaimDto : RoleClaimDto<TKey>
{
services.AddLocalization(opts => { opts.ResourcesPath = ConfigurationConsts.ResourcesPath; });

Expand All @@ -118,7 +119,7 @@ public static IServiceCollection AddAdminApiCors(this IServiceCollection service
new GenericTypeControllerFeatureProvider<TUserDto, TRoleDto,
TUser, TRole, TKey, TUserClaim, TUserRole, TUserLogin, TRoleClaim, TUserToken,
TUsersDto, TRolesDto, TUserRolesDto, TUserClaimsDto,
TUserProviderDto, TUserProvidersDto, TUserChangePasswordDto, TRoleClaimsDto, TUserClaimDto>());
TUserProviderDto, TUserProvidersDto, TUserChangePasswordDto, TRoleClaimsDto, TUserClaimDto, TRoleClaimDto>());
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ public class IdentityMapperProfile<TRoleDto, TUserRolesDto, TKey, TUserClaimsDto
where TRoleDto : RoleDto<TKey>
where TUserRolesDto : UserRolesDto<TRoleDto, TKey>
where TUserProviderDto : UserProviderDto<TKey>
where TUserProvidersDto : UserProvidersDto<TKey>
where TUserProvidersDto : UserProvidersDto<TUserProviderDto,TKey>
where TUserChangePasswordDto : UserChangePasswordDto<TKey>
where TRoleClaimsDto : RoleClaimsDto<TKey>
where TRoleClaimsDto : RoleClaimsDto<TRoleClaimDto, TKey>
where TRoleClaimDto : RoleClaimDto<TKey>
{
public IdentityMapperProfile()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>1.0.0-rc3</Version>
<Authors>Jan Škoruba</Authors>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<UserSecretsId>1cc472a2-4e4b-48ce-846b-5219f71fc643</UserSecretsId>
<DockerComposeProjectPath>..\..\docker-compose.dcproj</DockerComposeProjectPath>
Expand Down
2 changes: 1 addition & 1 deletion src/Skoruba.IdentityServer4.Admin.Api/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void ConfigureServices(IServiceCollection services)
UserIdentityUserLogin, UserIdentityRoleClaim, UserIdentityUserToken,
IdentityUsersDto, IdentityRolesDto, IdentityUserRolesDto,
IdentityUserClaimsDto, IdentityUserProviderDto, IdentityUserProvidersDto, IdentityUserChangePasswordDto,
IdentityRoleClaimsDto, IdentityUserClaimDto>();
IdentityRoleClaimsDto, IdentityUserClaimDto, IdentityRoleClaimDto>();

services.AddSwaggerGen(options =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@

namespace Skoruba.IdentityServer4.Admin.BusinessLogic.Identity.Dtos.Identity
{
public class RoleClaimsDto<TKey> : RoleClaimDto<TKey>, IRoleClaimsDto
public class RoleClaimsDto<TRoleClaimDto, TKey> : RoleClaimDto<TKey>, IRoleClaimsDto
where TRoleClaimDto : RoleClaimDto<TKey>
{
public RoleClaimsDto()
{
Claims = new List<RoleClaimDto<TKey>>();
Claims = new List<TRoleClaimDto>();
}

public string RoleName { get; set; }

public List<RoleClaimDto<TKey>> Claims { get; set; }
public List<TRoleClaimDto> Claims { get; set; }

public int TotalCount { get; set; }

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Skoruba.IdentityServer4.Admin.BusinessLogic.Identity.Dtos.Identity.Interfaces;
using System.Collections.Generic;
using System.Linq;
using IdentityServer4.EntityFramework.Entities;

namespace Skoruba.IdentityServer4.Admin.BusinessLogic.Identity.Dtos.Identity
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@

namespace Skoruba.IdentityServer4.Admin.BusinessLogic.Identity.Dtos.Identity
{
public class UserProvidersDto<TKey> : UserProviderDto<TKey>, IUserProvidersDto
public class UserProvidersDto<TUserProviderDto, TKey> : UserProviderDto<TKey>, IUserProvidersDto
where TUserProviderDto : UserProviderDto<TKey>
{
public UserProvidersDto()
{
Providers = new List<UserProviderDto<TKey>>();
Providers = new List<TUserProviderDto>();
}

public List<UserProviderDto<TKey>> Providers { get; set; }
public List<TUserProviderDto> Providers { get; set; }

List<IUserProviderDto> IUserProvidersDto.Providers => Providers.Cast<IUserProviderDto>().ToList();
}
Expand Down
Loading